diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | fetchmail.c | 5 | ||||
-rw-r--r-- | fetchmail.h | 2 | ||||
-rw-r--r-- | uid.c | 2 |
4 files changed, 7 insertions, 4 deletions
@@ -5,6 +5,8 @@ * Fixed Debian bug #63667, fetchmailconf: doesn't write .fetchmailrc properly. * RFC2177 IDLE should now be done even when there are no messages. * Joerg Plate's SSL typo fix. +* Try to limit the damage bad UIDL handling can do by refusing to mess with + the UIDL state if there has been an error. fetchmail-5.4.2 (Wed Jun 28 07:21:04 EDT 2000), 19069 lines: diff --git a/fetchmail.c b/fetchmail.c index f2f3cff6..b1cf9cb8 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -648,8 +648,9 @@ int main(int argc, char **argv) querystatus = query_host(ctl); #ifdef POP3_ENABLE - if (!check_only) - uid_end_query(ctl); + /* leave the UIDL state alone if there have been any errors */ + if (!check_only && !querystatus) + uid_swap_lists(ctl); #endif /* POP3_ENABLE */ if (querystatus == PS_SUCCESS) diff --git a/fetchmail.h b/fetchmail.h index 1603f4e6..980bd47b 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -453,7 +453,7 @@ char *str_find(struct idlist **, int); char *idpair_find(struct idlist **, const char *); void append_str_list(struct idlist **, struct idlist **); void expunge_uids(struct query *); -void uid_end_query(struct query *); +void uid_swap_lists(struct query *); void write_saved_lists(struct query *, const char *); /* rcfile_y.y */ @@ -424,7 +424,7 @@ void expunge_uids(struct query *ctl) idl->val.status.mark = UID_EXPUNGED; } -void uid_end_query(struct query *ctl) +void uid_swap_lists(struct query *ctl) /* finish a query */ { /* debugging code */ |