apps/iperf: fix not displaying bandwidth in udp
This patch allows iperf to display bandwidth/transfer in udp rx.
@@ -2430,6 +2430,11 @@ static void iperf_print_results(struct iperf_test *test)
} else {
iprintf(test, report_bw_format, sp->socket, start_time, end_time, ubuf, nbuf, report_receiver);
}
+ } else {
+ if (test->json_output)
+ cJSON_AddItemToObject(json_summary_stream, "receiver", iperf_json_printf("socket: %d start: %f end: %f seconds: %f bytes: %d bits_per_second: %f", (int64_t) sp->socket, (double) start_time, (double) end_time, (double) end_time, (int64_t) bytes_received, bandwidth * 8));
+ else
+ iprintf(test, report_bw_format, sp->socket, start_time, end_time, ubuf, nbuf, report_receiver);
}
}
}
