[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mailutils] Re: imap4d --foreground and DIGEST-MD5 buglet
From: |
Sergey Poznyakoff |
Subject: |
Re: [bug-mailutils] Re: imap4d --foreground and DIGEST-MD5 buglet |
Date: |
Thu, 24 Sep 2009 17:24:54 +0300 |
Simon Josefsson <address@hidden> ha escrit:
> That last patch wasn't perfect, it resulted in "EOF" debug logs on empty
> strings.
Ah, yes, I overlooked this too. My previous patch becomes then:
diff --git a/imap4d/util.c b/imap4d/util.c
index 8350de0..ff222ab 100644
--- a/imap4d/util.c
+++ b/imap4d/util.c
@@ -1375,19 +1375,17 @@ imap4d_getline (char **pbuf, size_t *psize, size_t
*pnbytes)
if (rc == 0)
{
char *s = *pbuf;
- 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)
{
+ if (imap4d_transcript)
+ mu_diag_output (MU_DIAG_DEBUG, "got EOF");
imap4d_bye (ERR_NO_IFILE);
/*FIXME rc = ECONNABORTED;*/
}
+ len = util_trim_nl (s, len);
+ if (imap4d_transcript)
+ mu_diag_output (MU_DIAG_DEBUG, "recv: %s", s);
if (pnbytes)
*pnbytes = len;
}
How about this?
Regards,
Sergey