aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce A. Mah <bmah@kitchenlab.org>2018-08-22 14:11:05 -0700
committerGitHub <noreply@github.com>2018-08-22 14:11:05 -0700
commitd71efe5ff5a296eb5067ab7f2607b425da73120c (patch)
treed37b144e0192bd6324a40fe3477764345ad70bcb /src
parentda6eebb52139e455c514d6da591a8af8e13a2ad6 (diff)
downloadiperf3-d71efe5ff5a296eb5067ab7f2607b425da73120c.tar.gz
Fix a segmentation fault in verbose mode. (#784)
To reproduce, run the server as "iperf3 --server --verbose" and run a client as "iperf3 --client localhost -reverse --parallel 2". Fixes #778. Based on https://github.com/Aquantia/iperf/commit/f1778271d2c6bed1dae09dccd33251 1b263f6871
Diffstat (limited to 'src')
-rwxr-xr-xsrc/iperf_api.c2
-rw-r--r--src/iperf_locale.c1
-rw-r--r--src/iperf_locale.h1
3 files changed, 3 insertions, 1 deletions
diff --git a/src/iperf_api.c b/src/iperf_api.c
index 0b76890..246cc01 100755
--- a/src/iperf_api.c
+++ b/src/iperf_api.c
@@ -3057,7 +3057,7 @@ iperf_print_results(struct iperf_test *test)
else
if (test->role == 's' && test->sender) {
if (test->verbose)
- iperf_printf(test, report_receiver_not_available_format, sp->socket);
+ iperf_printf(test, report_receiver_not_available_summary_format, "SUM");
}
else {
iperf_printf(test, report_sum_bw_format, start_time, receiver_time, ubuf, nbuf, report_receiver);
diff --git a/src/iperf_locale.c b/src/iperf_locale.c
index a1a240c..115adf2 100644
--- a/src/iperf_locale.c
+++ b/src/iperf_locale.c
@@ -396,6 +396,7 @@ const char report_receiver[] = "receiver";
const char report_sender_not_available_format[] = "[%3d] (sender statistics not available)\n";
const char report_sender_not_available_summary_format[] = "[%3s] (sender statistics not available)\n";
const char report_receiver_not_available_format[] = "[%3d] (receiver statistics not available)\n";
+const char report_receiver_not_available_summary_format[] = "[%3s] (receiver statistics not available)\n";
#if defined(linux)
const char report_tcpInfo[] =
diff --git a/src/iperf_locale.h b/src/iperf_locale.h
index ddd38fa..e1ceaf7 100644
--- a/src/iperf_locale.h
+++ b/src/iperf_locale.h
@@ -98,6 +98,7 @@ extern const char report_receiver[] ;
extern const char report_sender_not_available_format[];
extern const char report_sender_not_available_summary_format[];
extern const char report_receiver_not_available_format[];
+extern const char report_receiver_not_available_summary_format[];
extern const char report_tcpInfo[] ;
extern const char report_tcpInfo[] ;