fix: Don't print spurious JSON server output in bidir mode (#868)
In bidirectional mode, if option --get-server-output is set and if both client and server have --json set to true, client would still print the json output of server to stdout as a separate piece instead of including it into client's json output. This patch fixes this problem, the server's json output would be appended to client's json field 'server_output_json' as it should be.
Этот коммит содержится в:
родитель
0891322aad
Коммит
2679640c0f
@ -3353,7 +3353,7 @@ iperf_print_results(struct iperf_test *test)
|
||||
}
|
||||
|
||||
/* Print server output if we're on the client and it was requested/provided */
|
||||
if (test->role == 'c' && iperf_get_test_get_server_output(test)) {
|
||||
if (test->role == 'c' && iperf_get_test_get_server_output(test) && !test->json_output) {
|
||||
if (test->json_server_output) {
|
||||
iperf_printf(test, "\nServer JSON output:\n%s\n", cJSON_Print(test->json_server_output));
|
||||
cJSON_Delete(test->json_server_output);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user