diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-10-21 04:37:06 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-10-21 04:37:06 +0000 |
commit | 6a2df7a6a363148eebaaf5e9d77ced76899dcd18 (patch) | |
tree | d22fc958a669d29cf4b03139460591a734c39e75 /pop3.c | |
parent | 90ddfaa808179439a08181c4af9fdc0bcfe40ae2 (diff) | |
download | fetchmail-6a2df7a6a363148eebaaf5e9d77ced76899dcd18.tar.gz fetchmail-6a2df7a6a363148eebaaf5e9d77ced76899dcd18.tar.bz2 fetchmail-6a2df7a6a363148eebaaf5e9d77ced76899dcd18.zip |
Better errorb bailout in the UIDL handling.
svn path=/trunk/; revision=360
Diffstat (limited to 'pop3.c')
-rw-r--r-- | pop3.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -162,14 +162,17 @@ int *countp, *newp; /* grab the mailbox's UID list */ *newp = 0; gen_send(socket, "UIDL"); - if ((ok = pop3_ok(socket, buf)) == 0) { - while (SockGets(socket, buf, sizeof(buf)) >= 0) { + if ((ok = pop3_ok(socket, buf)) != 0) + return(PS_ERROR); + else + { + while (SockGets(socket, buf, sizeof(buf)) >= 0) + { if (outlevel == O_VERBOSE) fprintf(stderr,"%s\n",buf); - if (strcmp(buf, ".") == 0) { + if (buf[0] == '.') break; - } - if (sscanf(buf, "%d %s", &num, id) == 2) + else if (sscanf(buf, "%d %s", &num, id) == 2) { save_uid(&queryctl->newsaved, num, id); if (!uid_in_list(&queryctl->oldsaved, id)) |