aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pop3.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/pop3.c b/pop3.c
index 187deec8..e38e9c5d 100644
--- a/pop3.c
+++ b/pop3.c
@@ -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))