diff --git a/src/iperf_api.c b/src/iperf_api.c index 4813c20..eb936ce 100755 --- a/src/iperf_api.c +++ b/src/iperf_api.c @@ -2349,13 +2349,13 @@ iperf_print_results(struct iperf_test *test) /* Summary, UDP. */ lost_percent = 100.0 * sp->cnt_error / (sp->packet_count - sp->omitted_packet_count); if (test->json_output) - cJSON_AddItemToObject(json_summary_stream, "udp", iperf_json_printf("socket: %d start: %f end: %f seconds: %f bytes: %d bits_per_second: %f jitter_ms: %f lost_packets: %d packets: %d lost_percent: %f", (int64_t) sp->socket, (double) start_time, (double) end_time, (double) end_time, (int64_t) bytes_sent, bandwidth * 8, (double) sp->jitter * 1000.0, (int64_t) sp->cnt_error, (int64_t) (sp->packet_count - sp->omitted_packet_count), (double) lost_percent)); + cJSON_AddItemToObject(json_summary_stream, "udp", iperf_json_printf("socket: %d start: %f end: %f seconds: %f bytes: %d bits_per_second: %f jitter_ms: %f lost_packets: %d packets: %d lost_percent: %f out_of_order: %d", (int64_t) sp->socket, (double) start_time, (double) end_time, (double) end_time, (int64_t) bytes_sent, bandwidth * 8, (double) sp->jitter * 1000.0, (int64_t) sp->cnt_error, (int64_t) (sp->packet_count - sp->omitted_packet_count), (double) lost_percent, (int64_t) sp->outoforder_packets)); else { iprintf(test, report_bw_udp_format, sp->socket, start_time, end_time, ubuf, nbuf, sp->jitter * 1000.0, sp->cnt_error, (sp->packet_count - sp->omitted_packet_count), lost_percent, ""); if (test->role == 'c') iprintf(test, report_datagrams, sp->socket, (sp->packet_count - sp->omitted_packet_count)); if (sp->outoforder_packets > 0) - iprintf(test, report_sum_outoforder, start_time, end_time, sp->cnt_error); + iprintf(test, report_sum_outoforder, start_time, end_time, sp->outoforder_packets); } }