diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2016-07-31 15:46:51 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2016-07-31 16:52:06 +0100 |
commit | 3581f3213f74d47833cc710dfc678f1d79debaa7 (patch) | |
tree | ddae9c52c6223e779d64ffe60f220dedf30e6504 | |
parent | 0d9fa8c0a3e0e3dd140880861a60c3def18f176b (diff) |
Fix $body_linecount for empty lines
-rw-r--r-- | doc/doc-txt/ChangeLog | 3 | ||||
-rw-r--r-- | src/src/receive.c | 3 | ||||
-rw-r--r-- | test/stderr/0218 | 2 | ||||
-rw-r--r-- | test/stderr/0393 | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index bc48ad269..e1471b627 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -58,6 +58,9 @@ JH/13 Cutthrough: expand transport dkim_domain option when testing for dkim JH/14 Fix logging of errors under PIPELINING. Previously the log line giving the relevant preceding SMTP command did not note the pipelining mode. +JH/15 Fix counting of empty lines in $body_linecount and $message_linecount. + Previously they were not counted. + Exim version 4.87 ----------------- diff --git a/src/src/receive.c b/src/src/receive.c index 52e041c90..a59fbc991 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -682,7 +682,8 @@ while ((ch = (receive_getc)()) != EOF) case 1: /* After written "\n" */ if (ch == '.') { ch_state = 3; continue; } if (ch == '\r') { ch_state = 2; continue; } - if (ch != '\n') ch_state = 0; else linelength = -1; + if (ch == '\n') { body_linecount++; linelength = -1; } + else ch_state = 0; break; case 2: diff --git a/test/stderr/0218 b/test/stderr/0218 index fe4ee2df9..f9f1d6849 100644 --- a/test/stderr/0218 +++ b/test/stderr/0218 @@ -93,7 +93,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP>> QUIT SMTP(close)>> LOG: MAIN - ** a@test.ex F=<CALLER@test.ex> R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:<CALLER@test.ex>: 550 NO + ** a@test.ex F=<CALLER@test.ex> R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:<CALLER@test.ex>: 550 NO Exim version x.yz .... configuration file is TESTSUITE/test-config trusted user diff --git a/test/stderr/0393 b/test/stderr/0393 index 673d9e6f9..941e8f89c 100644 --- a/test/stderr/0393 +++ b/test/stderr/0393 @@ -27,7 +27,7 @@ lock file created mailbox TESTSUITE/test-mail/userx is locked writing to file TESTSUITE/test-mail/userx writing data block fd=dddd size=sss timeout=0 -process pppp running as transport filter: fd_write=10 fd_read=11 +process pppp running as transport filter: fd_write=9 fd_read=10 writing data block fd=dddd size=sss timeout=0 process pppp writing to transport filter copying from the filter |