fix: Consistently print target_bandwidth in the JSON start section. (#1177)

Previously we only did this for TCP tests with non-default -b.

Follow-on commit to #1168 and #776.
This commit is contained in:
Bruce A. Mah 2021-06-30 09:02:34 -07:00 committed by GitHub
parent 584a8d5492
commit b043b4e245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -901,9 +901,8 @@ iperf_on_connect(struct iperf_test *test)
else {
cJSON_AddNumberToObject(test->json_start, "tcp_mss_default", test->ctrl_sck_mss);
}
if (test->settings->rate)
cJSON_AddNumberToObject(test->json_start, "target_bitrate", test->settings->rate);
}
cJSON_AddNumberToObject(test->json_start, "target_bitrate", test->settings->rate);
} else if (test->verbose) {
iperf_printf(test, report_cookie, test->cookie);
if (test->protocol->id == SOCK_STREAM) {