[conduit/syncml: 86/244] Make the LUID be a uuid, return a Rid with the LUID and the hash of our blob



commit e7b7dced27f5d075e53a5780e5bd025f9e8c43ac
Author: John Carr <john carr unrouted co uk>
Date:   Fri Apr 24 08:33:11 2009 -0700

    Make the LUID be a uuid, return a Rid with the LUID and the hash of our blob
---
 conduit/modules/SyncmlModule/SyncmlModule.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/conduit/modules/SyncmlModule/SyncmlModule.py b/conduit/modules/SyncmlModule/SyncmlModule.py
index cc93194..5cc61e9 100644
--- a/conduit/modules/SyncmlModule/SyncmlModule.py
+++ b/conduit/modules/SyncmlModule/SyncmlModule.py
@@ -207,10 +207,11 @@ class SyncmlDataProvider(DataProvider.TwoWay):
 
         if LUID == None:
             self._queue.append((enums.SML_CHANGE_ADD, "", blob))
-            return conduit.datatypes.Rid(uid=str(hash(blob)), mtime=None, hash=None)
+            LUID = str(uuid.uuid4())
+            return conduit.datatypes.Rid(uid=LUID, hash=hash(blob))
 
         self._queue.append((enums.SML_CHANGE_REPLACE, uid, blob))
-        return conduit.datatypes.Rid(uid=LUID)
+        return conduit.datatypes.Rid(uid=LUID, hash=hash(blob))
 
     def delete(self, uid):
         self._queue.append((enums.SML_CHANGE_DELETE, uid, ""))



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