Added support for downloading last message

SVN revision: 2486
This commit is contained in:
Stefan Ritt 2013-04-19 12:17:44 +00:00
parent 05f2a4dafa
commit 5b5699e04e

View File

@ -14108,9 +14108,13 @@ int show_download_page(LOGBOOK * lbs, char *path)
/* return entry */ /* return entry */
for (index = 0; index < *lbs->n_el_index; index++) if (message_id == -1)
if (lbs->el_index[index].message_id == message_id) index = *lbs->n_el_index - 1; // last entry
break; else {
for (index = 0; index < *lbs->n_el_index; index++)
if (lbs->el_index[index].message_id == message_id)
break;
}
if (index == *lbs->n_el_index) if (index == *lbs->n_el_index)
return EL_NO_MSG; return EL_NO_MSG;