From: <svn...@op...> - 2009-10-16 14:49:45
|
Author: bellmich Date: Fri Oct 16 16:49:30 2009 New Revision: 1338 URL: http://libsyncml.opensync.org/changeset/1338 Log: added mapping support for locally deleted items Modified: trunk/tools/syncml-ds-tool.c Modified: trunk/tools/syncml-ds-tool.c ============================================================================== --- trunk/tools/syncml-ds-tool.c Fri Oct 16 16:42:38 2009 (r1337) +++ trunk/tools/syncml-ds-tool.c Fri Oct 16 16:49:30 2009 (r1338) @@ -1077,7 +1077,7 @@ sml_data_sync_change_item_set_action(item, changeType); SmlLocation *uid = sml_location_new(); - if (changeType == SML_CHANGE_REPLACE) + if (changeType != SML_CHANGE_ADD) { const gchar *map = g_key_file_get_string(datastore->index, "map", filename, error); if (!map) @@ -1127,7 +1127,10 @@ sml_data_sync_change_item_set_action(item, SML_CHANGE_DELETE); SmlLocation *uid = sml_location_new(); - sml_location_set_uri(uid, keys[i]); + const gchar *map = g_key_file_get_string(datastore->index, "map", keys[i], error); + if (!map) + goto error; + sml_location_set_uri(uid, map); if (!sml_data_sync_change_item_set_location(item, uid, error)) goto error; |