[sylpheed:37161] [patch] imap: Do not throw away fetched headers in case of an error
Attila Kinali
attila at kinali.ch
Wed Dec 14 02:08:21 JST 2022
A wonderful good evening,
In case there is an error while fetching headers, sylpheed discards all headers
already fetched. This leads, at the very least, to wasted time because next
time round, these headers have to be fetched again. In case of large directories,
this can lead to never getting the headers of the folder at all, because with
many 100'000 mails per folder, the probability of errors (mostly protocol errors)
increases drastically.
The following patch ensures that the downloaded headers are used in case of an
error (which sylpheed seems to ignore anyways):
--- a/libsylph/imap.c
+++ b/libsylph/imap.c
@@ -2781,6 +2781,7 @@ static gint imap_get_uncached_messages_func(IMAPSession *session, gpointer data)
if (sock_getline(SESSION(session)->sock, &tmp) < 0) {
log_warning(_("error occurred while getting envelope.\n"));
g_string_free(str, TRUE);
+ get_data->newlist = newlist;
return IMAP_SOCKET;
}
strretchomp(tmp);
Attila Kinali
--
In science if you know what you are doing you should not be doing it.
In engineering if you do not know what you are doing you should not be doing it.
-- Richard W. Hamming, The Art of Doing Science and Engineering
More information about the Sylpheed
mailing list