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

[minion-cvs] patch a bug found by noise: new-format descriptors do n...



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

Modified Files:
	ServerKeys.py ServerMain.py 
Log Message:
patch a bug found by noise: new-format descriptors do not have an IP, and we werent actually using the IP from the old-foramt descriptors in ServerMain.

Index: ServerKeys.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerKeys.py,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- ServerKeys.py	24 Aug 2004 22:16:09 -0000	1.68
+++ ServerKeys.py	6 Dec 2004 19:26:31 -0000	1.69
@@ -581,13 +581,6 @@
 
         return self.nextUpdate
 
-    def getAddress(self):
-        """Return out current ip/port/keyid tuple"""
-        desc = self.getCurrentDescriptor()
-        return (desc['Incoming/MMTP']['IP'],
-                desc['Incoming/MMTP']['Port'],
-                desc.getKeyDigest())
-
     def getCurrentDescriptor(self, now=None):
         """DOCDOC"""
         self._lock.acquire()

Index: ServerMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerMain.py,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- ServerMain.py	2 Dec 2004 06:47:08 -0000	1.135
+++ ServerMain.py	6 Dec 2004 19:26:31 -0000	1.136
@@ -333,17 +333,17 @@
     """
     ## Fields:
     # server -- an instance of _MMTPServer
-    # addr -- (publishedIP, publishedPort, publishedKeyID)
+    # addr -- the key ID we published in our descriptor.
     # incomingQueue -- pointer to IncomingQueue object to be used for
     #        self->self communication.
-    def __init__(self, location, (ip,port,keyid)):
+    def __init__(self, location, keyID):
         """Create a new OutgoingQueue that stores its packets in a given
            location."""
         mixminion.server.ServerQueue.PerAddressDeliveryQueue.__init__(self, location)
         self.server = None
         self.incomingQueue = None
         self.pingGenerator = None
-        self.keyID = keyid
+        self.keyID = keyID
 
     def configure(self, config):
         """Set up this queue according to a ServerConfig object."""
@@ -841,8 +841,6 @@
 
         self.dirClient._installAsKeyIDResolver()
 
-        publishedIP, publishedPort, publishedKeyID = self.keyring.getAddress()
-
         # FFFF Modulemanager should know about async so it can patch in if it
         # FFFF needs to.
         LOG.debug("Initializing delivery module")
@@ -867,7 +865,7 @@
         outgoingDir = os.path.join(queueDir, "outgoing")
         LOG.debug("Initializing outgoing queue")
         self.outgoingQueue = OutgoingQueue(outgoingDir,
-                               (publishedIP, publishedPort, publishedKeyID))
+                                           self.keyring.getKeyDigest())
         self.outgoingQueue.configure(config)
         LOG.debug("Found %d pending packets in outgoing queue",
                        self.outgoingQueue.count())