@@ -892,15 +892,15 @@ void
892892iperf_on_test_start (struct iperf_test * test )
893893{
894894 if (test -> json_output ) {
895- cJSON_AddItemToObject (test -> json_start , "test_start" , iperf_json_printf ("protocol: %s num_streams: %d blksize: %d omit: %d duration: %d server_duration: %d bytes: %d blocks: %d reverse: %d tos: %d target_bitrate: %d bidir: %d fqrate: %d interval: %f" , test -> protocol -> name , (int64_t ) test -> num_streams , (int64_t ) test -> settings -> blksize , (int64_t ) test -> omit , (int64_t ) test -> duration , (int64_t ) test -> settings -> bytes , (int64_t ) test -> settings -> blocks , test -> reverse ?(int64_t )1 :(int64_t )0 , (int64_t ) test -> settings -> tos , (int64_t ) test -> settings -> rate , (int64_t ) test -> bidirectional , (uint64_t ) test -> settings -> fqrate , test -> stats_interval ));
895+ cJSON_AddItemToObject (test -> json_start , "test_start" , iperf_json_printf ("protocol: %s num_streams: %d blksize: %d omit: %d duration: %d server_duration: %d bytes: %d blocks: %d reverse: %d tos: %d target_bitrate: %d bidir: %d fqrate: %d interval: %f" , test -> protocol -> name , (int64_t ) test -> num_streams , (int64_t ) test -> settings -> blksize , (int64_t ) test -> omit , (int64_t ) test -> duration , (int64_t ) test -> server_duration , ( int64_t ) test -> settings -> bytes , (int64_t ) test -> settings -> blocks , test -> reverse ?(int64_t )1 :(int64_t )0 , (int64_t ) test -> settings -> tos , (int64_t ) test -> settings -> rate , (int64_t ) test -> bidirectional , (uint64_t ) test -> settings -> fqrate , test -> stats_interval ));
896896 } else {
897897 if (test -> verbose ) {
898898 if (test -> settings -> bytes )
899899 iperf_printf (test , test_start_bytes , test -> protocol -> name , test -> num_streams , test -> settings -> blksize , test -> omit , test -> settings -> bytes , test -> settings -> tos );
900900 else if (test -> settings -> blocks )
901901 iperf_printf (test , test_start_blocks , test -> protocol -> name , test -> num_streams , test -> settings -> blksize , test -> omit , test -> settings -> blocks , test -> settings -> tos );
902902 else
903- iperf_printf (test , test_start_time , test -> protocol -> name , test -> num_streams , test -> settings -> blksize , test -> omit , test -> server_duration > test -> duration ? test -> server_duration : test -> duration , test -> settings -> tos );
903+ iperf_printf (test , test_start_time , test -> protocol -> name , test -> num_streams , test -> settings -> blksize , test -> omit , ( test -> server_duration > 0 && test -> duration > test -> server_duration ) ? test -> server_duration : test -> duration , test -> settings -> tos );
904904 }
905905 }
906906 if (test -> json_stream ) {
0 commit comments