Commit ff5392fa authored by Aurel's avatar Aurel

get deleted data depends on sync mode

parent dce9bcd2
...@@ -80,13 +80,16 @@ class SyncMLSynchronousEngine(EngineMixin): ...@@ -80,13 +80,16 @@ class SyncMLSynchronousEngine(EngineMixin):
"refresh_from_server_only"): "refresh_from_server_only"):
# We only get data from server # We only get data from server
finished = True finished = True
syncml_response.addFinal()
else: else:
finished = subscription._getSyncMLData(syncml_response=syncml_response, finished = subscription._getSyncMLData(syncml_response=syncml_response,
min_gid=None, max_gid=None) min_gid=None, max_gid=None)
syncml_logger.info("-> Client sendind modification, finished %s" % (finished,))
if finished: if finished:
# Add deleted objets # Delete message will contain final tag
subscription.getDeletedSyncMLData(syncml_response=syncml_response) subscription.getDeletedSyncMLData(syncml_response=syncml_response)
syncml_logger.info("-> Client sendind modification, finished %s" % (finished,))
if finished:
# Will then start processing sync commands from server # Will then start processing sync commands from server
subscription.processSyncRequest() subscription.processSyncRequest()
...@@ -200,12 +203,16 @@ class SyncMLSynchronousEngine(EngineMixin): ...@@ -200,12 +203,16 @@ class SyncMLSynchronousEngine(EngineMixin):
"refresh_from_client_only"): "refresh_from_client_only"):
# We only get data from client # We only get data from client
finished = True finished = True
syncml_response.addFinal()
else: else:
finished = subscriber._getSyncMLData(syncml_response=syncml_response, finished = subscriber._getSyncMLData(syncml_response=syncml_response,
min_gid=None, max_gid=None) min_gid=None, max_gid=None)
syncml_logger.info("-> Server sendind data, finished %s" % (finished,))
if finished: if finished:
# Delete message will contain final tag
subscriber.getDeletedSyncMLData(syncml_response=syncml_response) subscriber.getDeletedSyncMLData(syncml_response=syncml_response)
syncml_logger.info("-> Server sendind data, finished %s" % (finished,))
if finished:
subscriber.waitNotifications() subscriber.waitNotifications()
# Do not go into finished here as we must wait for # Do not go into finished here as we must wait for
# notifications from client # notifications from client
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment