From: juhosg Date: Sat, 7 Mar 2009 16:02:40 +0000 (+0000) Subject: [packages] net/iperf: fix a bug in single thread mode X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=f929c75d1d80b78c48e5abba9e5a4a83324c6e80;p=packages.git [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 --- diff --git a/net/iperf/Makefile b/net/iperf/Makefile index 46334650b..373264ba1 100644 --- a/net/iperf/Makefile +++ b/net/iperf/Makefile @@ -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 index 000000000..2ef127e19 --- /dev/null +++ b/net/iperf/patches/001-set-report-next-time-in-single-thread-mode.patch @@ -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 + */