bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-mailutils] Re: imap4d --foreground and DIGEST-MD5 buglet


From: Simon Josefsson
Subject: [bug-mailutils] Re: imap4d --foreground and DIGEST-MD5 buglet
Date: Thu, 24 Sep 2009 15:02:13 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

That last patch wasn't perfect, it resulted in "EOF" debug logs on empty
strings.  How about this instead.

/Simon

>From 9e6ff72bcd452c9d53f6869d9a425631148ad882 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Thu, 24 Sep 2009 15:01:30 +0200
Subject: [PATCH] Deal with empty lines properly.

imap4d/utils.c: Fix.
---
 imap4d/util.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/imap4d/util.c b/imap4d/util.c
index 8350de0..eb5b9c6 100644
--- a/imap4d/util.c
+++ b/imap4d/util.c
@@ -1375,19 +1375,11 @@ imap4d_getline (char **pbuf, size_t *psize, size_t 
*pnbytes)
   if (rc == 0)
     {
       char *s = *pbuf;
+      if (imap4d_transcript && len == 0)
+       mu_diag_output (MU_DIAG_DEBUG, "got EOF");
       len = util_trim_nl (s, len);
       if (imap4d_transcript)
-        {
-          if (len)
-            mu_diag_output (MU_DIAG_DEBUG, "recv: %s", s);
-          else
-            mu_diag_output (MU_DIAG_DEBUG, "got EOF");
-        }
-      if (len == 0)
-        {
-          imap4d_bye (ERR_NO_IFILE);
-          /*FIXME rc = ECONNABORTED;*/
-        }
+       mu_diag_output (MU_DIAG_DEBUG, "recv: %s", s);
       if (pnbytes)
        *pnbytes = len;
     }
-- 
1.6.3.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]