fixes for -T mode

This commit is contained in:
Brian Tierney 2009-11-16 02:50:24 +00:00
parent 01a5081d51
commit f4e1c1d4a4
3 changed files with 10 additions and 3 deletions

View File

@ -256,7 +256,9 @@ done:
printf("Test Complete. \n\n");
/* reset cookie when client is finished */
memset(test->streams->settings->cookie, '\0', COOKIE_SIZE);
/* XXX: which cookie to reset, and why is it stored to 2 places? */
//memset(test->streams->settings->cookie, '\0', COOKIE_SIZE);
memset(test->default_settings->cookie, '\0', COOKIE_SIZE);
return;
}

View File

@ -42,8 +42,8 @@ get_tcpinfo(struct iperf_test *test, struct iperf_interval_results *rp)
perror("getsockopt");
}
/* for debugging */
printf(" got TCP_INFO: %d, %d, %d, %d\n", rp->tcpInfo.tcpi_snd_cwnd,
rp->tcpInfo.tcpi_snd_ssthresh, rp->tcpInfo.tcpi_rcv_space, rp->tcpInfo.tcpi_rtt);
//printf(" got TCP_INFO: %d, %d, %d, %d\n", rp->tcpInfo.tcpi_snd_cwnd,
// rp->tcpInfo.tcpi_snd_ssthresh, rp->tcpInfo.tcpi_rcv_space, rp->tcpInfo.tcpi_rtt);
return;
#else
return;

View File

@ -77,6 +77,11 @@ new_timer(time_t sec, suseconds_t usec)
{
struct timer *tp;
tp = (struct timer *) malloc(sizeof(struct timer));
if (tp == NULL)
{
perror("malloc");
return NULL;
}
if (gettimeofday(&tp->begin, NULL) < 0)
{