rev 11486 - in trunk/packages/kdepim/debian: . patches

Ana Beatriz Guerrero López ana at alioth.debian.org
Sun Jul 13 22:23:15 UTC 2008


Author: ana
Date: 2008-07-13 22:23:15 +0000 (Sun, 13 Jul 2008)
New Revision: 11486

Added:
   trunk/packages/kdepim/debian/patches/34_knode_fix_interrups.diff
Modified:
   trunk/packages/kdepim/debian/changelog
Log:
  * Add patch by Felipe Sateler to reduce the number of interrupts in knode.
    (Closes: #472054)




Modified: trunk/packages/kdepim/debian/changelog
===================================================================
--- trunk/packages/kdepim/debian/changelog	2008-07-13 21:48:02 UTC (rev 11485)
+++ trunk/packages/kdepim/debian/changelog	2008-07-13 22:23:15 UTC (rev 11486)
@@ -1,6 +1,8 @@
 kdepim (4:3.5.9-5) UNRELEASED; urgency=low
 
   * Use wildcards when installing kdepim-apidocs. (Closes: #483327)
+  * Add patch by Felipe Sateler to reduce the number of interrupts in knode.
+    (Closes: #472054)
 
  -- Ana Beatriz Guerrero Lopez <ana at debian.org>  Sun, 13 Jul 2008 15:42:40 +0200
 

Added: trunk/packages/kdepim/debian/patches/34_knode_fix_interrups.diff
===================================================================
--- trunk/packages/kdepim/debian/patches/34_knode_fix_interrups.diff	                        (rev 0)
+++ trunk/packages/kdepim/debian/patches/34_knode_fix_interrups.diff	2008-07-13 22:23:15 UTC (rev 11486)
@@ -0,0 +1,78 @@
+--- kdepim-3.5.9/knode/knnetaccess.cpp
++++ kdepim-3.5.9.new/knode/knnetaccess.cpp
+@@ -70,6 +70,7 @@
+   disconnect(nntpNotifier, SIGNAL(activated(int)), this, SLOT(slotThreadSignal(int)));
+ 
+   nntpClient->terminateClient();
++  triggerAsyncThread(nntpOutPipe[1]);
+   nntpClient->wait();
+ 
+   delete nntpClient;
+diff -Nru -x Makefile.in kdepim-3.5.9/knode/knprotocolclient.cpp kdepim-3.5.9.new/knode/knprotocolclient.cpp
+--- kdepim-3.5.9/knode/knprotocolclient.cpp
++++ kdepim-3.5.9.new/knode/knprotocolclient.cpp
+@@ -93,7 +93,6 @@
+   timeval tv;
+   int selectRet;
+ 
+-  int holdTime = 1000 * account.hold();
+   while (true) {
+     if (isConnected()) {  // we are connected, hold the connection for xx secs
+       FD_ZERO(&fdsR);
+@@ -101,24 +100,21 @@
+       FD_SET(tcpSocket, &fdsR);
+       FD_ZERO(&fdsE);
+       FD_SET(tcpSocket, &fdsE);
+-      tv.tv_sec = 0;
+-      tv.tv_usec = 1000;
+-      --holdTime;
++      tv.tv_sec = account.hold();
++      tv.tv_usec = 0;
+       selectRet = KSocks::self()->select(FD_SETSIZE, &fdsR, NULL, &fdsE, &tv);
++      if ( mTerminate ) {
++        clearPipe();
++        closeConnection();
++        return;
++      }
++      // In addition to the timeout, this will also happen
++      // if select() returns early because of a signal
+       if (selectRet == 0) {
+-        if (holdTime <= 0) {
+ #ifndef NDEBUG
+           qDebug("knode: KNProtocolClient::waitForWork(): hold time elapsed, closing connection.");
+ #endif
+           closeConnection();               // nothing happend...
+-          holdTime = 1000 * account.hold();
+-        } else {
+-          if ( mTerminate ) {
+-            closeConnection();
+-            return;
+-          }
+-          continue;
+-        }
+       } else {
+         if (((selectRet > 0)&&(!FD_ISSET(fdPipeIn,&fdsR)))||(selectRet == -1)) {
+ #ifndef NDEBUG
+@@ -129,18 +125,16 @@
+       }
+     }
+ 
+-    struct timeval timeout;
+     do {
+-      timeout.tv_sec = 0;
+-      timeout.tv_usec = 1000;
+       FD_ZERO(&fdsR);
+       FD_SET(fdPipeIn, &fdsR);
+-      if (mTerminate)
+-        return;
+-    } while (select(FD_SETSIZE, &fdsR, NULL, NULL, &timeout) <= 0);  // don't get tricked by signals
++    } while (select(FD_SETSIZE, &fdsR, NULL, NULL, NULL) <= 0);  // don't get tricked by signals
+ 
+     clearPipe();      // remove start signal
+ 
++    if (mTerminate)
++      return;
++
+     timer.start();
+ 
+     sendSignal(TSjobStarted);




More information about the pkg-kde-commits mailing list