[packages] net/iperf: fix a bug in single thread mode
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 7 Mar 2009 16:02:40 +0000 (16:02 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 7 Mar 2009 16:02:40 +0000 (16:02 +0000)
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

net/iperf/Makefile
net/iperf/patches/001-set-report-next-time-in-single-thread-mode.patch [new file with mode: 0644]

index 4633465..373264b 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iperf
 PKG_VERSION:=2.0.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
@@ -28,8 +28,8 @@ define Package/iperf/Default
 endef
 
 define Package/iperf/Default/description
- Iperf is a modern alternative for measuring TCP and UDP bandwidth 
- performance, allowing the tuning of various parameters and 
+ Iperf is a modern alternative for measuring TCP and UDP bandwidth
+ performance, allowing the tuning of various parameters and
  characteristics.
 endef
 
diff --git a/net/iperf/patches/001-set-report-next-time-in-single-thread-mode.patch b/net/iperf/patches/001-set-report-next-time-in-single-thread-mode.patch
new file mode 100644 (file)
index 0000000..2ef127e
--- /dev/null
@@ -0,0 +1,14 @@
+--- 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
+          */