Репозиторий Sisyphus
Последнее обновление: 14 октября 2019 | Пакетов: 17518 | Посещений: 15265604
en ru br
Репозитории ALT
S:2.0.12-alt1
5.1: 2.0.4-alt1
4.1: 2.0.2-alt2
4.0: 2.0.2-alt2
3.0: 1.7.0-alt1.1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: iperf

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: high-latency.patch
Скачать


--- iperf-2.0.5.orig/src/Server.cpp
+++ iperf-2.0.5/src/Server.cpp
@@ -188,7 +188,7 @@ void Server::write_UDP_AckFIN( ) {
     struct timeval timeout; 
 
     int count = 0; 
-    while ( count < 10 ) {
+    while ( count < 50 ) {
         count++; 
 
         UDP_datagram *UDP_Hdr;
@@ -216,13 +216,15 @@ void Server::write_UDP_AckFIN( ) {
 
         }
 
-        // write data 
-        write( mSettings->mSock, mBuf, mSettings->mBufLen ); 
+	if ((count % 5) == 1) {
+	    // write data 
+	    write( mSettings->mSock, mBuf, mSettings->mBufLen ); 
+	}
 
         // wait until the socket is readable, or our timeout expires 
         FD_SET( mSettings->mSock, &readSet ); 
-        timeout.tv_sec  = 1; 
-        timeout.tv_usec = 0; 
+        timeout.tv_sec  = 0; 
+        timeout.tv_usec = 250000; 
 
         rc = select( mSettings->mSock+1, &readSet, NULL, NULL, &timeout ); 
         FAIL_errno( rc == SOCKET_ERROR, "select", mSettings ); 
--- iperf-2.0.5.orig/src/Client.cpp
+++ iperf-2.0.5/src/Client.cpp
@@ -435,11 +435,13 @@ void Client::write_UDP_FIN( ) {
     struct timeval timeout; 
 
     int count = 0; 
-    while ( count < 10 ) {
+    while ( count < 50 ) {
         count++; 
 
-        // write data 
-        write( mSettings->mSock, mBuf, mSettings->mBufLen ); 
+	if ((count % 5) == 1) {
+	    // write data 
+	    write( mSettings->mSock, mBuf, mSettings->mBufLen ); 
+	}
 
         // wait until the socket is readable, or our timeout expires 
         FD_ZERO( &readSet ); 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin