From 00d565cfbe90fab3b157e644caca4eb4a2ebec79 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 --- 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 61d13f3e0a..e46376db4c 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2290,8 +2290,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