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

[minion-cvs] Fix wait time; key rotation bug.



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

Modified Files:
	HashLog.py ServerConfig.py ServerKeys.py 
Log Message:
Fix wait time; key rotation bug.

Index: HashLog.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/HashLog.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- HashLog.py	5 May 2003 00:38:46 -0000	1.10
+++ HashLog.py	30 May 2003 13:54:45 -0000	1.11
@@ -24,6 +24,18 @@
 # We flush the log every MAX_JOURNAL hashes.
 MAX_JOURNAL = 128
 
+#DOCDOC
+_OPEN_HASHLOGS = {}
+
+#XXXX004 locking??
+def getHashLog(filename, keyid):
+    try:
+        return _OPEN_HASHLOGS[(filename, keyid)]
+    except KeyError:
+        hl = HashLog(filename, keyid)
+        _OPEN_HASHLOGS[(filename, keyid)] = hl
+        return hl
+
 # flags to pass to os.open when opening the journal file.
 _JOURNAL_OPEN_FLAGS = os.O_WRONLY|os.O_CREAT|getattr(os,'O_SYNC',0)
 class HashLog:

Index: ServerConfig.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerConfig.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- ServerConfig.py	30 May 2003 09:01:41 -0000	1.29
+++ ServerConfig.py	30 May 2003 13:54:45 -0000	1.30
@@ -276,7 +276,7 @@
 			 },
         'Outgoing/MMTP' : { 'Enabled' : ('REQUIRE', C._parseBoolean, "no"),
                             'Retry' : ('ALLOW', C._parseIntervalList,
-                                   "every hour for 1 day, 7 hours for 5 days"),
+                                 "every 1 hour for 1 day, 7 hours for 5 days"),
                           'Allow' : ('ALLOW*', C._parseAddressSet_allow, None),
                           'Deny' : ('ALLOW*', C._parseAddressSet_deny, None) },
         # FFFF Missing: Queue-Size / Queue config options

Index: ServerKeys.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerKeys.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- ServerKeys.py	30 May 2003 01:49:53 -0000	1.34
+++ ServerKeys.py	30 May 2003 13:54:45 -0000	1.35
@@ -425,7 +425,7 @@
 
             for k in keys:
                 packetKeys.append(k.getPacketKey())
-                hashLogs.append(mixminion.server.HashLog.HashLog(
+                hashLogs.append(mixminion.server.HashLog.getHashLog(
                     k.getHashLogFileName(), k.getPacketKeyID()))
             packetHandler.setKeys(packetKeys, hashLogs)