packages/net/iperf/patches/001-set-report-next-time-in-single-thread-mode.patch
juhosg f929c75d1d [packages] net/iperf: fix a bug in single thread mode
root@OpenWrt:/# iperf -c 192.168.20.100 -i 60
------------------------------------------------------------
Client connecting to 192.168.20.100, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.20.1 port 53214 connected with 192.168.20.100 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0--7988.8 sec  0.00 Bytes  -0.00 bits/sec
[ ID] Interval       Transfer     Bandwidth
[  3] -7988.8--7928.8 sec  0.00 Bytes  0.00 bits/sec


git-svn-id: svn://svn.openwrt.org/openwrt/packages@14776 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-03-07 16:02:40 +00:00

15 lines
428 B
Diff

--- a/src/Reporter.c
+++ b/src/Reporter.c
@@ -309,6 +309,11 @@ ReportHeader* InitReport( thread_Setting
#else
// set start time
gettimeofday( &(reporthdr->report.startTime), NULL );
+
+ // set next time
+ reporthdr->report.nextTime = reporthdr->report.startTime;
+ TimeAdd( reporthdr->report.nextTime, reporthdr->report.intervalTime );
+
/*
* Process the report in this thread
*/