diff options
author | Bruce A. Mah <bmah@es.net> | 2017-02-02 09:23:29 -0800 |
---|---|---|
committer | Bruce A. Mah <bmah@es.net> | 2017-02-02 09:23:29 -0800 |
commit | f46e2e3edc3cefd3c451bac6d621092f0d71c087 (patch) | |
tree | 977a72e9663089bb56d08ff06c5882637b794233 /src/iperf_client_api.c | |
parent | 7c79294b5b2b3499fdf1dcd42969971909a740e3 (diff) | |
download | iperf3-f46e2e3edc3cefd3c451bac6d621092f0d71c087.tar.gz |
Prevent two recently added messages from spamming JSON output on UDP tests.
Stumbled on by: @daldoyle
Diffstat (limited to 'src/iperf_client_api.c')
-rw-r--r-- | src/iperf_client_api.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/iperf_client_api.c b/src/iperf_client_api.c index 4b8a326..3b4e448 100644 --- a/src/iperf_client_api.c +++ b/src/iperf_client_api.c @@ -373,7 +373,9 @@ iperf_connect(struct iperf_test *test) else { test->settings->blksize = DEFAULT_UDP_BLKSIZE; } - printf("Setting UDP block size to %d\n", test->settings->blksize); + if (test->verbose) { + printf("Setting UDP block size to %d\n", test->settings->blksize); + } } /* @@ -381,7 +383,10 @@ iperf_connect(struct iperf_test *test) * block size is larger than the MSS, print a warning. */ if (test->settings->blksize > test->ctrl_sck_mss) { - printf("Warning: UDP block size %d exceeds TCP MSS %d, may result in fragmentation / drops\n", test->settings->blksize, test->ctrl_sck_mss); + char str[128]; + snprintf(str, sizeof(str), + "Warning: UDP block size %d exceeds TCP MSS %d, may result in fragmentation / drops", test->settings->blksize, test->ctrl_sck_mss); + warning(str); } } |