From 2dff75f4dff0199719eca03e01b6ef23d91ceebc 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 3ca8f89cf4..0f527ece96 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2037,8 +2037,10 @@ static int sv_body(char *hostname, int s, 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