turned off some debug code, and fixed a bug in interval times
This commit is contained in:
parent
97887027e7
commit
1882b9cb65
@ -515,7 +515,7 @@ iperf_reporter_callback(struct iperf_test * test)
|
||||
sp = test->streams; /* reset back to 1st stream */
|
||||
if (test->num_streams > 1)
|
||||
{
|
||||
ip = test->streams->result->interval_results; /* use 1st stream for timing info */
|
||||
ip = test->streams->result->last_interval_results; /* use 1st stream for timing info */
|
||||
unit_snprintf(ubuf, UNIT_LEN, (double) (bytes), 'A');
|
||||
|
||||
start_time = timeval_diff(&sp->result->start_time,&ip->interval_start_time);
|
||||
@ -637,7 +637,7 @@ print_interval_results(struct iperf_test * test, struct iperf_stream * sp, char
|
||||
char *message = (char *) malloc(MAX_RESULT_STRING);
|
||||
|
||||
//printf("in print_interval_results for stream %d \n", sp->socket);
|
||||
ir = sp->result->interval_results;
|
||||
ir = sp->result->last_interval_results; /* get last entry in linked list */
|
||||
if (ir == NULL)
|
||||
{
|
||||
printf("print_interval_results Error: interval_results = NULL \n");
|
||||
@ -941,7 +941,7 @@ iperf_run_client(struct iperf_test * test)
|
||||
|
||||
//printf("Done getting/printing results. \n");
|
||||
|
||||
printf("send TEST_END to server \n");
|
||||
//printf("send TEST_END to server \n");
|
||||
sp->settings->state = TEST_END;
|
||||
sp->snd(sp); /* send message to server */
|
||||
|
||||
|
@ -182,7 +182,7 @@ iperf_run_server(struct iperf_test * test)
|
||||
test->accept(test);
|
||||
test->default_settings->state = TEST_RUNNING;
|
||||
FD_CLR(test->listener_sock_tcp, &test->temp_set);
|
||||
printf("iperf_run_server: accepted TCP connection \n");
|
||||
//printf("iperf_run_server: accepted TCP connection \n");
|
||||
test->num_streams++;
|
||||
}
|
||||
} else
|
||||
@ -310,14 +310,14 @@ handle_message(struct iperf_test * test, int message, struct iperf_stream * sp)
|
||||
}
|
||||
if (message == ALL_STREAMS_END)
|
||||
{
|
||||
printf("client sent ALL_STREAMS_END message, printing results \n");
|
||||
printf("Client done sending data. Printing final results. \n");
|
||||
/* print server results */
|
||||
results_string = test->reporter_callback(test);
|
||||
puts(results_string); /* send to stdio */
|
||||
}
|
||||
if (message == TEST_END)
|
||||
{
|
||||
printf("client sent TEST_END message, shuting down sockets.. \n");
|
||||
//printf("client sent TEST_END message, shuting down sockets.. \n");
|
||||
/* FREE ALL STREAMS */
|
||||
tp1 = test->streams;
|
||||
do
|
||||
|
@ -75,9 +75,12 @@ iperf_tcp_recv(struct iperf_stream * sp)
|
||||
return -1;
|
||||
}
|
||||
sp->settings->state = message;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (message != STREAM_RUNNING) /* tell me about non STREAM_RUNNING messages
|
||||
* for debugging */
|
||||
printf("iperf_tcp_recv: got message type %d \n", message);
|
||||
#endif
|
||||
|
||||
switch (message)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user