add comment

This commit is contained in:
Brian Tierney 2009-10-23 23:01:46 +00:00
parent a1eb8922d3
commit d56546318e

View File

@ -123,7 +123,6 @@ exchange_parameters(struct iperf_test * test)
fprintf(stderr, "Busy server Detected. Exiting.\n");
exit(-1);
}
return;
}
@ -151,7 +150,6 @@ param_received(struct iperf_stream * sp, struct param_exchange * param)
param->state = ACCESS_DENIED;
buf[0] = ACCESS_DENIED;
}
free(buf);
result = send(sp->socket, buf, sizeof(struct param_exchange), 0);
if (result < 0)
@ -425,9 +423,9 @@ iperf_tcp_recv(struct iperf_stream * sp)
perror("iperf_tcp_recv: recv error: MSG_PEEK");
return -1;
}
message = (int) ch;
if( message != 7) /* tell me about non STREAM_RUNNING messages for debugging */
if (message != 7) /* tell me about non STREAM_RUNNING messages
* for debugging */
printf("iperf_tcp_recv: got message type %d \n", message);
switch (message)
@ -458,6 +456,9 @@ iperf_tcp_recv(struct iperf_stream * sp)
case ALL_STREAMS_END:
size = sp->settings->blksize;
#ifdef USE_RECV
/* NOTE: Nwrite/Nread seems to be 10-15% faster than send/recv for localhost on OSX.
More testing needed on other OSes to be sure.
*/
do
{ /* XXX: is the do/while really needed? */
printf("iperf_tcp_recv: Calling recv: expecting %d bytes \n", size);
@ -623,7 +624,10 @@ iperf_tcp_send(struct iperf_stream * sp)
sp->settings->state = STREAM_RUNNING;
if (sp->buffer[0] != STREAM_END)
/* XXX: check/fix this. Maybe only want STREAM_BEGIN and STREAM_RUNNING */
/*
* XXX: check/fix this. Maybe only want STREAM_BEGIN and
* STREAM_RUNNING
*/
sp->result->bytes_sent += size;
//printf("number bytes sent so far = %d \n", (int) sp->result->bytes_sent);
@ -1081,7 +1085,10 @@ iperf_reporter_callback(struct iperf_test * test)
if (sp->outoforder_packets > 0)
printf(report_sum_outoforder, start_time, end_time, sp->cnt_error);
}
/* XXX: do we need to do something with any TCP_INFO results here too? */
/*
* XXX: do we need to do something with any TCP_INFO results
* here too?
*/
}
sp = sp->next;
}
@ -1617,7 +1624,8 @@ iperf_run_client(struct iperf_test * test)
while (!all_data_sent(test) && !timer->expired(timer))
{
#ifdef NEED_THIS /* not sure what this was for, so removed -blt */
#ifdef NEED_THIS /* not sure what this was for, so removed
* -blt */
memcpy(&test->temp_set, &test->write_set, sizeof(test->write_set));
printf("Calling select... \n");
ret = select(test->max_fd + 1, NULL, &test->write_set, NULL, &tv);
@ -1870,7 +1878,6 @@ main(int argc, char **argv)
exchange_parameters(test);
test->streams->settings->state = STREAM_BEGIN;
}
//printf("in main: calling iperf_run \n");
iperf_run(test);
iperf_free_test(test);