From af34c411dfbb2a452543311f1989f445edb3b3c1 Mon Sep 17 00:00:00 2001 From: "Bruce A. Mah" Date: Mon, 17 Sep 2018 13:35:16 -0700 Subject: [PATCH] Flush (if appropriate) after a server-side message where we weren't before. (#795) Also fix some stupid looking code and update a copyright. Fixes #790. --- src/iperf_server_api.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/iperf_server_api.c b/src/iperf_server_api.c index 5fa1dd7..fabee60 100644 --- a/src/iperf_server_api.c +++ b/src/iperf_server_api.c @@ -1,5 +1,5 @@ /* - * iperf, Copyright (c) 2014, 2015, 2016, 2017, The Regents of the University of + * iperf, Copyright (c) 2014-2018 The Regents of the University of * California, through Lawrence Berkeley National Laboratory (subject * to receipt of any required approvals from the U.S. Dept. of * Energy). All rights reserved. @@ -88,10 +88,10 @@ iperf_server_listen(struct iperf_test *test) if (!test->json_output) { iperf_printf(test, "-----------------------------------------------------------\n"); iperf_printf(test, "Server listening on %d\n", test->server_port); - } - - if (!test->json_output) iperf_printf(test, "-----------------------------------------------------------\n"); + if (test->forceflush) + iflush(test); + } FD_ZERO(&test->read_set); FD_ZERO(&test->write_set);