aboutsummaryrefslogtreecommitdiff
path: root/src/iperf_error.c
diff options
context:
space:
mode:
authorJef Poskanzer <jef@mail.acme.com>2013-02-07 17:54:52 -0800
committerJef Poskanzer <jef@mail.acme.com>2013-02-07 17:54:52 -0800
commitf19a68d53a123a7259992e2ed3259d3fa5e257bb (patch)
tree6af3fd8b540ea544cabdd7e3f00b9ce769612e0d /src/iperf_error.c
parent7ea98727a8c1f3cf5222e85139dad1c68f0f3a0d (diff)
downloadiperf3-f19a68d53a123a7259992e2ed3259d3fa5e257bb.tar.gz
Oops, left out the important line from the error routine.
Diffstat (limited to 'src/iperf_error.c')
-rw-r--r--src/iperf_error.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/iperf_error.c b/src/iperf_error.c
index 12f0e12..dd5a805 100644
--- a/src/iperf_error.c
+++ b/src/iperf_error.c
@@ -24,6 +24,7 @@ iperf_err(struct iperf_test *test, const char *format, ...)
char str[1000];
va_start(argp, format);
+ vsnprintf(str, sizeof(str), format, argp);
if (test != NULL && test->json_output && test->json_top != NULL)
cJSON_AddStringToObject(test->json_top, "error", str);
else
@@ -39,6 +40,7 @@ iperf_errexit(struct iperf_test *test, const char *format, ...)
char str[1000];
va_start(argp, format);
+ vsnprintf(str, sizeof(str), format, argp);
if (test != NULL && test->json_output && test->json_top != NULL) {
cJSON_AddStringToObject(test->json_top, "error", str);
iperf_json_finish(test);