From e99a3a6cbb83db9934b97ddac837ab37cb9e4719 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 21 Oct 2017 19:27:01 +0100 Subject: CHUNKING: Fix flush of chunk on error --- src/src/smtp_in.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index b27949e35..1fdb705a5 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -681,8 +681,11 @@ return buf; void bdat_flush_data(void) { -unsigned n = chunking_data_left; -(void) bdat_getbuf(&n); +while (chunking_data_left) +{ + unsigned n = chunking_data_left; + (void) bdat_getbuf(&n); +} receive_getc = lwr_receive_getc; receive_getbuf = lwr_receive_getbuf; -- cgit v1.2.3