fixed bug where -T flag without -i flag caused core dump

This commit is contained in:
Brian Tierney 2009-11-20 23:04:23 +00:00
parent 6796ba135a
commit 54cdc61e24

View File

@ -306,6 +306,7 @@ handle_message(struct iperf_test * test, int message, struct iperf_stream * sp)
if (message == RESULT_REQUEST)
{
sp->settings->state = RESULT_RESPOND;
test->stats_callback(test);
results_string = test->reporter_callback(test);
sp->data = results_string;
send_result_to_client(sp);
@ -314,6 +315,7 @@ handle_message(struct iperf_test * test, int message, struct iperf_stream * sp)
{
printf("Client done sending data. Printing final results. \n");
/* print server results */
test->stats_callback(test);
results_string = test->reporter_callback(test);
puts(results_string); /* send to stdio */
}