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 <[email protected]>
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



_______________________________________________
Bug-mailutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Reply via email to