[conduit/syncml: 35/244] Arrrrrrgh
- From: John Carr <johncarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [conduit/syncml: 35/244] Arrrrrrgh
- Date: Thu, 21 May 2009 05:51:44 -0400 (EDT)
commit 0f8da5be0cc84fc8aea98ec88125de575d2014e5
Author: John Carr <john carr unrouted co uk>
Date: Thu Apr 16 10:30:43 2009 -0700
Arrrrrrgh
---
conduit/modules/SyncmlModule/SyncmlModule.py | 12 +++++++-----
test/python-tests/TestSyncSyncmlEvents.py | 2 ++
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/conduit/modules/SyncmlModule/SyncmlModule.py b/conduit/modules/SyncmlModule/SyncmlModule.py
index bb977f9..04518ba 100644
--- a/conduit/modules/SyncmlModule/SyncmlModule.py
+++ b/conduit/modules/SyncmlModule/SyncmlModule.py
@@ -87,6 +87,7 @@ class SyncmlDataProvider(DataProvider.TwoWay):
# don't exit this callback - we want to inject the changes conduit tells us about
# first.
self._put_lock.wait(60)
+ self._put_lock.clear()
self._syncml_sendall()
return
@@ -172,7 +173,6 @@ class SyncmlDataProvider(DataProvider.TwoWay):
self._queue = None
def refresh(self):
- self._changes = {}
self._queue = []
self._syncml_run()
@@ -181,6 +181,7 @@ class SyncmlDataProvider(DataProvider.TwoWay):
# then we block in the EventCallback until Conduit has queued all its changes. Then we unblock libsyncml.
# Cripes. Stab my eyes out. NOW.
self._refresh_lock.wait(60)
+ self._refresh_lock.clear()
def get_all(self):
return []
@@ -211,18 +212,19 @@ class SyncmlDataProvider(DataProvider.TwoWay):
def finish(self, a, b, c):
self._put_lock.set()
self._refresh_lock.wait(60)
+ self._refresh_lock.clear()
self._changes
- #self.syncobj.unref(pysyncml.byref(self.syncobj))
+ self.syncobj.unref(pysyncml.byref(self.syncobj))
if len(self._queue) > 0 and self._session_type == enums.SML_SESSION_TYPE_CLIENT:
self._changes = {}
self._syncml_run()
self._refresh_lock.wait(60)
+ self._refresh_lock.clear()
self._refresh_lock.wait(60)
+ self._refresh_lock.clear()
self._changes = None
- #self.syncobj.unref(pysyncml.byref(self.syncobj))
-
- time.sleep(10)
+ self.syncobj.unref(pysyncml.byref(self.syncobj))
self._queue = None
diff --git a/test/python-tests/TestSyncSyncmlEvents.py b/test/python-tests/TestSyncSyncmlEvents.py
index ff25dfa..c2cee9c 100644
--- a/test/python-tests/TestSyncSyncmlEvents.py
+++ b/test/python-tests/TestSyncSyncmlEvents.py
@@ -46,6 +46,8 @@ test.sync()
#ok("Sync completed", abort == False)
#ok("All notes transferred (%s,%s)" % (a,b), a == b)
+time.sleep(2)
+
os.kill(server.pid, signal.SIGINT)
finished()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]