From cdcb94eea7533da2d67e0fc8d393829a2498f1ad Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Mon, 18 May 2015 19:08:02 -0400 Subject: [PATCH] Don't add write errors into bytecounts Signed-off-by: Rich Salz Reviewed-by: Matt Caswell (cherry picked from commit 00d565cfbe90fab3b157e644caca4eb4a2ebec79) --- apps/s_server.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/s_server.c b/apps/s_server.c index 5d58fe0bdf..e66272096c 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2455,8 +2455,10 @@ static int sv_body(char *hostname, int s, int stype, unsigned char *context) ret = 1; goto err; } - l += k; - i -= k; + if (k > 0) { + l += k; + i -= k; + } if (i <= 0) break; } -- 2.25.1