]> Pileus Git - ~andy/fetchmail/commitdiff
If UIDL parser fails, barf with PS_ERROR rather than ignoring the problem.
authorMatthias Andree <matthias.andree@gmx.de>
Fri, 22 Jul 2005 10:38:09 +0000 (10:38 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Fri, 22 Jul 2005 10:38:09 +0000 (10:38 -0000)
svn path=/trunk/; revision=4163

pop3.c

diff --git a/pop3.c b/pop3.c
index b9b675078b044edff60476068f083f68de2060b8..dd3daf27e9945113203599d3027dc52bacf10dc5 100644 (file)
--- a/pop3.c
+++ b/pop3.c
@@ -916,7 +916,7 @@ static int pop3_getrange(int sock,
                unsigned long unum;
 
                *newp = 0;
-               while ((ok = gen_recv(sock, buf, sizeof(buf))) == 0)
+               while ((ok = gen_recv(sock, buf, sizeof(buf))) == PS_SUCCESS)
                {
                    if (DOTLINE(buf))
                        break;
@@ -962,7 +962,8 @@ static int pop3_getrange(int sock,
                            old = save_str(&ctl->oldsaved, id, UID_UNSEEN);
                            old->val.status.num = unum;
                        }
-                   }
+                   } else
+                       return PS_ERROR;
                }
            }
        }