diff --git a/src/iperf_server_api.c b/src/iperf_server_api.c index 9c05992..f25ec44 100644 --- a/src/iperf_server_api.c +++ b/src/iperf_server_api.c @@ -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; } diff --git a/src/tcp_info.c b/src/tcp_info.c index 1fdce5c..38a5c99 100644 --- a/src/tcp_info.c +++ b/src/tcp_info.c @@ -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; diff --git a/src/timer.c b/src/timer.c index 325b249..1807ff9 100644 --- a/src/timer.c +++ b/src/timer.c @@ -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) {