diff options
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); } } |