[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Backport fix to maint branch



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv22772/lib/mixminion

Modified Files:
      Tag: mixminion-v0-0-6-patches
	ClientMain.py 
Log Message:
Backport fix to maint branch

Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.138.2.3
retrieving revision 1.138.2.4
diff -u -d -r1.138.2.3 -r1.138.2.4
--- ClientMain.py	18 Dec 2003 23:13:55 -0000	1.138.2.3
+++ ClientMain.py	19 Dec 2003 17:12:25 -0000	1.138.2.4
@@ -498,7 +498,12 @@
                     for h in handles:
                         if self.queue.packetExists(h):
                             self.queue.removePacket(h)
-                    if handles:
+                    removed = 0
+                    for p in pktList:
+                        if hasattr(p, 'remove'):
+                            p.remove()
+                            removed = 1
+                    if handles or removed:
                         self.queue.cleanQueue()
                 finally:
                     clientUnlock()
@@ -519,6 +524,8 @@
                 return self.queue.getPacket(self.h)[0]
             def __cmp__(self,other):
                 return cmp(id(self),id(other))
+            def remove(self):
+                self.queue.removePacket(self.h)
 
         LOG.info("Flushing packet queue")
         clientLock()