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

[minion-cvs] Add new Fragments.py module to hold fragmentation and u...



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

Modified Files:
	HashLog.py ServerQueue.py 
Log Message:
Add new Fragments.py module to hold fragmentation and unfragmentation code

Index: HashLog.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/HashLog.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- HashLog.py	8 Aug 2003 21:40:42 -0000	1.22
+++ HashLog.py	14 Aug 2003 19:37:25 -0000	1.23
@@ -73,10 +73,10 @@
     finally:
         _HASHLOG_DICT_LOCK.release()
 
-class HashLog(mixminion.Filestore.JournaledDBBase):
+class HashLog(mixminion.Filestore.BooleanJournaledDBBase):
     def __init__(self, filename, keyid):
-        mixminion.Filestore.JournaledDBBase.__init__(self,
-                 filename, "digest hash", 20, 0, "1")
+        mixminion.Filestore.BooleanJournaledDBBase.__init__(self,
+                 filename, "digest hash", 20)
 
         self.keyid = keyid
         try:
@@ -85,22 +85,6 @@
         except KeyError:
             self.log["KEYID"] = keyid
             self.log.sync()
-
-    def _encodeKey(self, k):
-        return binascii.b2a_hex(k)
-    def _encodeVal(self, v):
-        return "1"
-    def _decodeVal(self, v):
-        return 1
-
-    def _jEncodeKey(self, k):
-        return k
-    def _jDecodeKey(self, k):
-        return k
-    def _jEncodeVal(self, v):
-        return ""
-    def _jDecodeVal(self, v):
-        return 1
 
     def seenHash(self, hash):
         return self.has_key(hash)

Index: ServerQueue.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerQueue.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- ServerQueue.py	24 Jul 2003 18:01:29 -0000	1.29
+++ ServerQueue.py	14 Aug 2003 19:37:25 -0000	1.30
@@ -316,10 +316,9 @@
         assert self.retrySchedule is not None
         try:
             self._lock.acquire()
-            handle = self.store.queueObject(msg)
             ds = _DeliveryState(now,None,address)
             ds.setNextAttempt(self.retrySchedule, now)
-            self.store.setMetadata(handle, ds)
+            handle = self.store.queueObjectAndMetadata(msg, ds)
             LOG.trace("DeliveryQueue got message %s for %s",
                       handle, self.qname)
         finally: