[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Fix bug when pinger stops knowing about a server; preve...
Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria:/tmp/cvs-serv17622/lib/mixminion/server
Modified Files:
MMTPServer.py Pinger.py
Log Message:
Fix bug when pinger stops knowing about a server; prevent raw bytes from hitting the log.
Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- MMTPServer.py 4 Nov 2005 06:23:07 -0000 1.90
+++ MMTPServer.py 10 Nov 2005 02:17:08 -0000 1.91
@@ -520,6 +520,13 @@
# connect to.
# _wasOnceConnected: True iff we have successfully negotiated a protocol
# version with the other server.
+ def __init__(self, *args, **kwargs):
+ MMTPClientConnection.__init__(self, *args, **kwargs)
+
+ self._wasOnceConnected = 0
+ self._pingLog = None
+ self._identity = None
+
def configurePingLog(self, pingLog, identity):
"""Must be called after construction: set this _ClientCon to
report events to the pinglog 'pingLog'; tell it that we are
Index: Pinger.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/Pinger.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- Pinger.py 4 Nov 2005 16:24:16 -0000 1.29
+++ Pinger.py 10 Nov 2005 02:17:09 -0000 1.30
@@ -1382,7 +1382,8 @@
identities[s.getIdentityDigest()]=1
for id1,id2 in self.nextPingTime.keys():
if not (identities.has_key(id1) and identities.has_key(id2)):
- LOG.trace("Unscheduling 2-hop ping for %s,%s",id1,id2)
+ LOG.trace("Unscheduling 2-hop ping for %s,%s",
+ binascii.b2a_hex(id1),binascii.b2a_hex(id2))
del self.nextPingTime[(id1,id2)]
for id1 in identities.keys():
for id2 in identities.keys():