Changeset 2368
- Timestamp:
- 07/29/07 13:57:38 (1 year ago)
- Files:
-
- trunk/opensync/archive/opensync_archive.c (modified) (26 diffs)
- trunk/opensync/client/opensync_client.c (modified) (24 diffs)
- trunk/opensync/client/opensync_client_proxy.c (modified) (21 diffs)
- trunk/opensync/client/osplugin.c (modified) (1 diff)
- trunk/opensync/data/opensync_data.c (modified) (1 diff)
- trunk/opensync/db/opensync_db.c (modified) (29 diffs)
- trunk/opensync/engine/opensync_engine.c (modified) (24 diffs)
- trunk/opensync/engine/opensync_obj_engine.c (modified) (28 diffs)
- trunk/opensync/engine/opensync_status.c (modified) (1 diff)
- trunk/opensync/format/opensync_converter.c (modified) (4 diffs)
- trunk/opensync/format/opensync_filter.c (modified) (7 diffs)
- trunk/opensync/format/opensync_format_env.c (modified) (17 diffs)
- trunk/opensync/format/opensync_time.c (modified) (23 diffs)
- trunk/opensync/group/opensync_group.c (modified) (10 diffs)
- trunk/opensync/group/opensync_group_env.c (modified) (4 diffs)
- trunk/opensync/group/opensync_member.c (modified) (11 diffs)
- trunk/opensync/group/opensync_xml.c (modified) (1 diff)
- trunk/opensync/helper/opensync_anchor.c (modified) (11 diffs)
- trunk/opensync/helper/opensync_hashtable.c (modified) (11 diffs)
- trunk/opensync/ipc/opensync_queue.c (modified) (10 diffs)
- trunk/opensync/mapping/opensync_mapping.c (modified) (1 diff)
- trunk/opensync/mapping/opensync_mapping_table.c (modified) (7 diffs)
- trunk/opensync/mapping/opensync_mapping_view.c (modified) (2 diffs)
- trunk/opensync/merger/opensync_capabilities.c (modified) (12 diffs)
- trunk/opensync/merger/opensync_merger.c (modified) (6 diffs)
- trunk/opensync/merger/opensync_xmlfield.c (modified) (3 diffs)
- trunk/opensync/merger/opensync_xmlformat.c (modified) (9 diffs)
- trunk/opensync/module/opensync_module.c (modified) (7 diffs)
- trunk/opensync/opensync_context.c (modified) (4 diffs)
- trunk/opensync/opensync_support.c (modified) (6 diffs)
- trunk/opensync/opensync_xml.c (modified) (3 diffs)
- trunk/opensync/plugin/opensync_plugin.c (modified) (1 diff)
- trunk/opensync/plugin/opensync_plugin_env.c (modified) (9 diffs)
- trunk/opensync/plugin/opensync_plugin_info.c (modified) (1 diff)
- trunk/opensync/plugin/opensync_sink.c (modified) (1 diff)
- trunk/opensync/version/opensync_version.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/opensync/archive/opensync_archive.c
r2364 r2368 41 41 void _osync_archive_trace(void *data, const char *query) 42 42 { 43 osync_trace(TRACE_INTERNAL, "query executed: %s", query ? query : "nil");43 osync_trace(TRACE_INTERNAL, "query executed: %s", query); 44 44 } 45 45 … … 58 58 static osync_bool osync_archive_create_changes(OSyncDB *db, const char *objtype, OSyncError **error) 59 59 { 60 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, objtype ? objtype : "nil", error);60 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, objtype, error); 61 61 62 62 osync_assert(db); … … 89 89 90 90 error: 91 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");91 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 92 92 return FALSE; 93 93 } … … 95 95 static osync_bool osync_archive_create_changelog(OSyncDB *db, const char *objtype, OSyncError **error) 96 96 { 97 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, objtype ? objtype : "nil", error);97 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, objtype, error); 98 98 99 99 osync_assert(db); … … 125 125 126 126 error: 127 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");127 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 128 128 return FALSE; 129 129 } … … 131 131 static osync_bool osync_archive_create(OSyncDB *db, const char *objtype, OSyncError **error) 132 132 { 133 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, objtype ? objtype : "nil", error);133 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, objtype, error); 134 134 135 135 osync_assert(db); … … 162 162 163 163 error: 164 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");164 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 165 165 return FALSE; 166 166 } … … 174 174 OSyncArchive *osync_archive_new(const char *filename, OSyncError **error) 175 175 { 176 osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, filename ? filename : "nil", error);176 osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, filename, error); 177 177 osync_assert(filename); 178 178 … … 199 199 200 200 error: 201 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");201 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 202 202 return NULL; 203 203 } … … 251 251 osync_bool osync_archive_save_data(OSyncArchive *archive, const char *uid, const char *objtype, const char *data, unsigned int size, OSyncError **error) 252 252 { 253 osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %p, %u, %p)", __func__, archive, uid ? uid : "nil", objtype ? objtype : "nil", data, size, error);253 osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %p, %u, %p)", __func__, archive, uid, objtype, data, size, error); 254 254 osync_assert(archive); 255 255 osync_assert(uid); … … 276 276 277 277 error: 278 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");278 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 279 279 return FALSE; 280 280 } … … 293 293 int osync_archive_load_data(OSyncArchive *archive, const char *uid, const char *objtype, char **data, unsigned int *size, OSyncError **error) 294 294 { 295 osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %p, %p, %p)", __func__, archive, uid ? uid : "nil", objtype ? objtype : "nil", data, size, error);295 osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %p, %p, %p)", __func__, archive, uid, objtype, data, size, error); 296 296 osync_assert(archive); 297 297 osync_assert(uid); … … 319 319 320 320 error: 321 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");321 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 322 322 return -1; 323 323 } … … 338 338 { 339 339 340 osync_trace(TRACE_ENTRY, "%s(%p, %lli, %s, %s, %lli, %lli, %p)", __func__, archive, id, uid ? uid : "nil", objtype ? objtype : "nil", mappingid, memberid, error);340 osync_trace(TRACE_ENTRY, "%s(%p, %lli, %s, %s, %lli, %lli, %p)", __func__, archive, id, uid, objtype, mappingid, memberid, error); 341 341 osync_assert(archive); 342 342 osync_assert(uid); … … 372 372 373 373 error: 374 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");374 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 375 375 return 0; 376 376 } … … 387 387 osync_bool osync_archive_delete_change(OSyncArchive *archive, long long int id, const char *objtype, OSyncError **error) 388 388 { 389 osync_trace(TRACE_ENTRY, "%s(%p, %lli, %s, %p)", __func__, archive, id, objtype ? objtype : "nil", error);389 osync_trace(TRACE_ENTRY, "%s(%p, %lli, %s, %p)", __func__, archive, id, objtype, error); 390 390 osync_assert(archive); 391 391 osync_assert(objtype); … … 406 406 407 407 error: 408 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");408 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 409 409 return FALSE; 410 410 } … … 424 424 osync_bool osync_archive_load_changes(OSyncArchive *archive, const char *objtype, OSyncList **ids, OSyncList **uids, OSyncList **mappingids, OSyncList **memberids, OSyncError **error) 425 425 { 426 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p, %p, %p, %p)", __func__, archive, objtype ? objtype : "nil", ids, uids, mappingids, memberids, error);426 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p, %p, %p, %p)", __func__, archive, objtype, ids, uids, mappingids, memberids, error); 427 427 428 428 osync_assert(archive); … … 460 460 *memberids = osync_list_append((*memberids), GINT_TO_POINTER((int)memberid)); 461 461 462 osync_trace(TRACE_INTERNAL, "Loaded change with uid %s, mappingid %lli from member %lli", uid ? uid : "nil", mappingid, memberid);462 osync_trace(TRACE_INTERNAL, "Loaded change with uid %s, mappingid %lli from member %lli", uid, mappingid, memberid); 463 463 } 464 464 … … 468 468 return TRUE; 469 469 error: 470 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");470 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 471 471 return FALSE; 472 472 } … … 484 484 osync_bool osync_archive_load_ignored_conflicts(OSyncArchive *archive, const char *objtype, OSyncList **ids, OSyncList **changetypes, OSyncError **error) 485 485 { 486 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p)", __func__, archive, objtype ? objtype : "nil", ids, error);486 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p)", __func__, archive, objtype, ids, error); 487 487 488 488 osync_assert(archive); … … 523 523 return TRUE; 524 524 error: 525 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");525 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 526 526 return FALSE; 527 527 } … … 539 539 osync_bool osync_archive_save_ignored_conflict(OSyncArchive *archive, const char *objtype, long long int id, OSyncChangeType changetype, OSyncError **error) 540 540 { 541 osync_trace(TRACE_ENTRY, "%s(%p, %s, %lli, %p)", __func__, archive, objtype ? objtype : "nil", id, error);541 osync_trace(TRACE_ENTRY, "%s(%p, %s, %lli, %p)", __func__, archive, objtype, id, error); 542 542 543 543 osync_assert(archive); … … 560 560 561 561 error: 562 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");562 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 563 563 return FALSE; 564 564 } … … 575 575 { 576 576 577 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, archive, objtype ? objtype : "nil", error);577 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, archive, objtype, error); 578 578 osync_assert(archive); 579 579 osync_assert(objtype); … … 595 595 596 596 error: 597 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");597 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 598 598 return FALSE; 599 599 } trunk/opensync/client/opensync_client.c
r2364 r2368 450 450 osync_message_read_string(message, &config); 451 451 452 osync_trace(TRACE_INTERNAL, "enginepipe %s, formatdir %s, plugindir %s, pluginname %s", enginepipe ? enginepipe : "nil", formatdir ? formatdir : "nil", plugindir ? plugindir : "nil", pluginname ? pluginname : "nil");452 osync_trace(TRACE_INTERNAL, "enginepipe %s, formatdir %s, plugindir %s, pluginname %s", enginepipe, formatdir, plugindir, pluginname); 453 453 454 454 /* First we connect the engine pipe if necessary*/ … … 538 538 g_free(formatdir); 539 539 g_free(config); 540 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");540 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 541 541 return FALSE; 542 542 } … … 589 589 osync_message_unref(reply); 590 590 error: 591 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");591 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 592 592 return FALSE; 593 593 } … … 667 667 osync_message_unref(reply); 668 668 error: 669 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");669 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 670 670 return FALSE; 671 671 } … … 681 681 osync_message_read_string(message, &objtype); 682 682 osync_message_read_int(message, &slowsync); 683 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil");683 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype); 684 684 685 685 OSyncObjTypeSink *sink = NULL; … … 732 732 osync_message_unref(reply); 733 733 error: 734 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");734 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 735 735 return FALSE; 736 736 } … … 744 744 745 745 osync_message_read_string(message, &objtype); 746 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil");746 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype); 747 747 748 748 OSyncObjTypeSink *sink = NULL; … … 785 785 osync_message_unref(reply); 786 786 error: 787 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");787 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 788 788 return FALSE; 789 789 } … … 797 797 798 798 osync_message_read_string(message, &objtype); 799 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil");799 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype); 800 800 801 801 OSyncObjTypeSink *sink = NULL; … … 840 840 osync_message_unref(reply); 841 841 error: 842 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");842 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 843 843 return FALSE; 844 844 } … … 899 899 osync_message_unref(reply); 900 900 error: 901 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");901 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 902 902 return FALSE; 903 903 } … … 917 917 OSyncData *data = osync_change_get_data(change); 918 918 919 osync_trace(TRACE_INTERNAL, "Searching sink for %s", osync_data_get_objtype(data) ? osync_data_get_objtype(data) : "nil");919 osync_trace(TRACE_INTERNAL, "Searching sink for %s", osync_data_get_objtype(data)); 920 920 921 921 OSyncObjTypeSink *sink = NULL; … … 942 942 943 943 error: 944 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");944 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 945 945 return FALSE; 946 946 } … … 954 954 955 955 osync_message_read_string(message, &objtype); 956 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil");956 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype); 957 957 958 958 OSyncObjTypeSink *sink = NULL; … … 995 995 osync_message_unref(reply); 996 996 error: 997 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");997 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 998 998 return FALSE; 999 999 } … … 1007 1007 1008 1008 osync_message_read_string(message, &objtype); 1009 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil");1009 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype); 1010 1010 1011 1011 OSyncObjTypeSink *sink = NULL; … … 1048 1048 osync_message_unref(reply); 1049 1049 error: 1050 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1050 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1051 1051 return FALSE; 1052 1052 } … … 1158 1158 client->thread = NULL; 1159 1159 osync_client_shutdown(client); 1160 osync_trace(TRACE_EXIT_ERROR, "%s: Unable to notify parent. no outgoing queue: %s", __func__, osync_error_print(&error) ? osync_error_print(&error) : "nil");1160 osync_trace(TRACE_EXIT_ERROR, "%s: Unable to notify parent. no outgoing queue: %s", __func__, osync_error_print(&error)); 1161 1161 osync_error_unref(&error); 1162 1162 return; … … 1168 1168 osync_client_error_shutdown(client, locerror); 1169 1169 osync_error_unref(&error); 1170 osync_trace(TRACE_EXIT_ERROR, "%s: Error while sending error: %s", __func__, osync_error_print(&locerror) ? osync_error_print(&locerror) : "nil");1170 osync_trace(TRACE_EXIT_ERROR, "%s: Error while sending error: %s", __func__, osync_error_print(&locerror)); 1171 1171 osync_error_unref(&locerror); 1172 1172 return; … … 1176 1176 osync_client_error_shutdown(client, locerror); 1177 1177 osync_error_unref(&error); 1178 osync_trace(TRACE_EXIT_ERROR, "%s: Error while sending error: %s", __func__, osync_error_print(&locerror) ? osync_error_print(&locerror) : "nil");1178 osync_trace(TRACE_EXIT_ERROR, "%s: Error while sending error: %s", __func__, osync_error_print(&locerror)); 1179 1179 osync_error_unref(&locerror); 1180 1180 return; … … 1183 1183 osync_message_unref(errorreply); 1184 1184 1185 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error) ? osync_error_print(&error) : "nil");1185 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error)); 1186 1186 osync_error_unref(&error); 1187 1187 } … … 1226 1226 OSyncClient *client = osync_try_malloc0(sizeof(OSyncClient), error); 1227 1227 if (!client) { 1228 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1228 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1229 1229 return NULL; 1230 1230 } … … 1321 1321 osync_bool osync_client_run_external(OSyncClient *client, char *pipe_path, OSyncPlugin *plugin, OSyncError **error) 1322 1322 { 1323 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p)", __func__, client, pipe_path ? pipe_path : "nil", plugin, error);1323 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p)", __func__, client, pipe_path, plugin, error); 1324 1324 /* Create connection pipes **/ 1325 1325 OSyncQueue *incoming = osync_queue_new(pipe_path, error); … … 1355 1355 osync_queue_free(incoming); 1356 1356 error: 1357 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1357 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1358 1358 return FALSE; 1359 1359 } trunk/opensync/client/opensync_client_proxy.c
r2364 r2368 168 168 169 169 if (_osync_kill(pid, SIGTERM) < 0) { 170 osync_trace(TRACE_INTERNAL, "Error killing old osplugin: %s. Stale pid file?", g_strerror(errno) ? g_strerror(errno) : "nil");170 osync_trace(TRACE_INTERNAL, "Error killing old osplugin: %s. Stale pid file?", g_strerror(errno)); 171 171 /* Don't return failure if kill() failed, because it may be a stale pid file */ 172 172 } … … 319 319 if (!osync_demarshal_objtype_sink(message, &sink, &locerror)) 320 320 goto error; 321 osync_trace(TRACE_INTERNAL, "Received sink: %s", osync_objtype_sink_get_name(sink) ? osync_objtype_sink_get_name(sink) : "nil");321 osync_trace(TRACE_INTERNAL, "Received sink: %s", osync_objtype_sink_get_name(sink)); 322 322 323 323 proxy->objtypes = g_list_append(proxy->objtypes, sink); … … 783 783 OSyncQueue *write2 = NULL; 784 784 785 osync_trace(TRACE_ENTRY, "%s(%p, %i, %s, %p)", __func__, proxy, type, path ? path : "nil", error);785 osync_trace(TRACE_ENTRY, "%s(%p, %i, %s, %p)", __func__, proxy, type, path, error); 786 786 osync_assert(proxy); 787 787 osync_assert(type != OSYNC_START_TYPE_UNKNOWN); … … 911 911 osync_queue_free(write1); 912 912 error: 913 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");913 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 914 914 return FALSE; 915 915 } … … 973 973 974 974 error: 975 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");975 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 976 976 return FALSE; 977 977 } … … 979 979 osync_bool osync_client_proxy_initialize(OSyncClientProxy *proxy, initialize_cb callback, void *userdata, const char *formatdir, const char *plugindir, const char *plugin, const char *groupname, const char *configdir, const char *config, OSyncError **error) 980 980 { 981 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %s, %s, %s, % s, %p, %p)", __func__, proxy, callback, userdata, formatdir ? formatdir : "nil", plugindir ? plugindir : "nil", plugin ? plugin : "nil", groupname ? groupname : "nil", configdir ? configdir : "nil", config, error);981 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %s, %s, %s, %p, %p)", __func__, proxy, callback, userdata, formatdir, plugindir, plugin, groupname, configdir, config, error); 982 982 osync_assert(proxy); 983 983 … … 1021 1021 osync_message_unref(message); 1022 1022 error: 1023 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1023 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1024 1024 return FALSE; 1025 1025 } … … 1054 1054 osync_message_unref(message); 1055 1055 error: 1056 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1056 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1057 1057 return FALSE; 1058 1058 } … … 1087 1087 osync_message_unref(message); 1088 1088 error: 1089 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1089 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1090 1090 return FALSE; 1091 1091 } … … 1105 1105 osync_bool osync_client_proxy_connect(OSyncClientProxy *proxy, connect_cb callback, void *userdata, const char *objtype, osync_bool slowsync, OSyncError **error) 1106 1106 { 1107 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", error);1107 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype, error); 1108 1108 1109 1109 callContext *ctx = osync_try_malloc0(sizeof(callContext), error); … … 1135 1135 osync_message_unref(message); 1136 1136 error: 1137 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1137 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1138 1138 return FALSE; 1139 1139 } … … 1141 1141 osync_bool osync_client_proxy_disconnect(OSyncClientProxy *proxy, disconnect_cb callback, void *userdata, const char *objtype, OSyncError **error) 1142 1142 { 1143 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", error);1143 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype, error); 1144 1144 1145 1145 callContext *ctx = osync_try_malloc0(sizeof(callContext), error); … … 1170 1170 osync_message_unref(message); 1171 1171 error: 1172 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1172 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1173 1173 return FALSE; 1174 1174 } … … 1206 1206 osync_message_unref(message); 1207 1207 error: 1208 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1208 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1209 1209 return FALSE; 1210 1210 } … … 1212 1212 osync_bool osync_client_proxy_get_changes(OSyncClientProxy *proxy, get_changes_cb callback, void *userdata, const char *objtype, OSyncError **error) 1213 1213 { 1214 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", error);1214 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype, error); 1215 1215 1216 1216 callContext *ctx = osync_try_malloc0(sizeof(callContext), error); … … 1241 1241 osync_message_unref(message); 1242 1242 error: 1243 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1243 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1244 1244 return FALSE; 1245 1245 } … … 1279 1279 osync_message_unref(message); 1280 1280 error: 1281 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1281 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1282 1282 return FALSE; 1283 1283 } … … 1285 1285 osync_bool osync_client_proxy_committed_all(OSyncClientProxy *proxy, committed_all_cb callback, void *userdata, const char *objtype, OSyncError **error) 1286 1286 { 1287 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", error);1287 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype, error); 1288 1288 osync_assert(proxy); 1289 1289 … … 1315 1315 osync_message_unref(message); 1316 1316 error: 1317 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1317 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1318 1318 return FALSE; 1319 1319 } … … 1321 1321 osync_bool osync_client_proxy_sync_done(OSyncClientProxy *proxy, sync_done_cb callback, void *userdata, const char *objtype, OSyncError **error) 1322 1322 { 1323 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", error);1323 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype, error); 1324 1324 osync_assert(proxy); 1325 1325 … … 1351 1351 osync_message_unref(message); 1352 1352 error: 1353 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");1353 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 1354 1354 return FALSE; 1355 1355 } trunk/opensync/client/osplugin.c
r2364 r2368 128 128 osync_client_unref(client); 129 129 130 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error) ? osync_error_print(&error) : "nil");130 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error)); 131 131 fprintf(stderr, "Unable to initialize environment: %s\n", osync_error_print(&error)); 132 132 osync_error_unref(&error); trunk/opensync/data/opensync_data.c
r2364 r2368 347 347 time_t time = osync_objformat_get_revision(format, data->data, data->size, error); 348 348 if (time == -1) { 349 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");349 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 350 350 return -1; 351 351 } trunk/opensync/db/opensync_db.c
r2364 r2368 27 27 static void _osync_db_trace(void *data, const char *query) 28 28 { 29 osync_trace(TRACE_INTERNAL, "osync_db query executed: %s", query ? query: "nil");29 osync_trace(TRACE_INTERNAL, "osync_db query executed: %s", query); 30 30 } 31 31 */ … … 42 42 OSyncDB *db = osync_try_malloc0(sizeof(OSyncDB), error); 43 43 if (!db) { 44 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");44 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 45 45 return NULL; 46 46 } … … 60 60 osync_bool osync_db_open(OSyncDB *db, const char *dbfile, OSyncError **error) 61 61 { 62 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, dbfile ? dbfile : "nil", error);62 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, dbfile, error); 63 63 64 64 osync_assert(db); … … 67 67 if (sqlite3_open(dbfile, &(db->sqlite3db)) != SQLITE_OK) { 68 68 osync_error_set(error, OSYNC_ERROR_GENERIC, "Cannot open database: %s", sqlite3_errmsg(db->sqlite3db)); 69 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, sqlite3_errmsg(db->sqlite3db) ? sqlite3_errmsg(db->sqlite3db) : "nil");69 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, sqlite3_errmsg(db->sqlite3db)); 70 70 return FALSE; 71 71 } … … 91 91 if (rc) { 92 92 osync_error_set(error, OSYNC_ERROR_GENERIC, "Cannot close database: %s", sqlite3_errmsg(db->sqlite3db)); 93 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, sqlite3_errmsg(db->sqlite3db) ? sqlite3_errmsg(db->sqlite3db) : "nil");93 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, sqlite3_errmsg(db->sqlite3db)); 94 94 return FALSE; 95 95 } … … 109 109 int osync_db_count(OSyncDB *db, const char *query, OSyncError **error) 110 110 { 111 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query ? query : "nil", error);111 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query, error); 112 112 113 113 osync_assert(db); … … 122 122 sqlite3_free_table(result); 123 123 g_free(errmsg); 124 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");124 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 125 125 return -1; 126 126 } … … 141 141 osync_bool osync_db_query(OSyncDB *db, const char *query, OSyncError **error) 142 142 { 143 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query ? query :"nil", error);143 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query, error); 144 144 145 145 osync_assert(db); … … 150 150 if (sqlite3_exec(db->sqlite3db, query, NULL, NULL, &errmsg) != SQLITE_OK) { 151 151 osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to execute simple query: %s", errmsg); 152 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, errmsg ? errmsg : "nil");152 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, errmsg); 153 153 g_free(errmsg); 154 154 return FALSE; … … 170 170 GList *osync_db_query_table(OSyncDB *db, const char *query, OSyncError **error) 171 171 { 172 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query ? query : "nil", error);172 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query, error); 173 173 174 174 osync_assert(db); … … 184 184 osync_error_set(error, OSYNC_ERROR_GENERIC, "Unable to query table: %s", errmsg); 185 185 g_free(errmsg); 186 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");186 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 187 187 return NULL; 188 188 } … … 237 237 char *osync_db_query_single_string(OSyncDB *db, const char *query, OSyncError **error) 238 238 { 239 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query ? query : "nil", error);239 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query, error); 240 240 241 241 osync_assert(db); … … 265 265 sqlite3_finalize(ppStmt); 266 266 267 osync_trace(TRACE_EXIT, "%s: %s", __func__, result ? result : "nil");267 osync_trace(TRACE_EXIT, "%s: %s", __func__, result); 268 268 return result; 269 269 … … 271 271 g_free(result); 272 272 sqlite3_finalize(ppStmt); 273 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");273 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 274 274 return NULL; 275 275 } … … 287 287 int osync_db_query_single_int(OSyncDB *db, const char *query, OSyncError **error) 288 288 { 289 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query ? query : "nil", error);289 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query, error); 290 290 291 291 osync_assert(db); … … 320 320 error: 321 321 sqlite3_finalize(ppStmt); 322 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");322 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 323 323 return -1; 324 324 } … … 334 334 osync_bool osync_db_reset(OSyncDB *db, const char *tablename, OSyncError **error) 335 335 { 336 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, tablename ? tablename : "nil", error);336 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, tablename, error); 337 337 338 338 osync_assert(db); … … 350 350 error: 351 351 g_free(query); 352 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");352 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 353 353 return FALSE; 354 354 } … … 381 381 error: 382 382 sqlite3_finalize(ppStmt); 383 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");383 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 384 384 return FALSE; 385 385 } … … 387 387 osync_bool osync_db_reset_full_by_path(const char *path, OSyncError **error) 388 388 { 389 osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, path ? path : "nil", error);389 osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, path, error); 390 390 391 391 osync_assert(path); … … 401 401 return TRUE; 402 402 error: 403 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");403 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 404 404 return FALSE; 405 405 … … 417 417 int osync_db_exists(OSyncDB *db, const char *tablename, OSyncError **error) 418 418 { 419 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, tablename ? tablename : "nil", error);419 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, tablename, error); 420 420 421 421 osync_assert(db); … … 432 432 433 433 osync_error_set(error, OSYNC_ERROR_GENERIC, "Query Error: %s", sqlite3_errmsg(db->sqlite3db)); 434 osync_trace(TRACE_EXIT_ERROR, "Database query error: %s", sqlite3_errmsg(db->sqlite3db) ? sqlite3_errmsg(db->sqlite3db) : "nil");434 osync_trace(TRACE_EXIT_ERROR, "Database query error: %s", sqlite3_errmsg(db->sqlite3db)); 435 435 return -1; 436 436 } … … 441 441 g_free(query); 442 442 443 osync_trace(TRACE_EXIT, "%s: table \"%s\" doesn't exist.", __func__, tablename ? tablename : "nil");443 osync_trace(TRACE_EXIT, "%s: table \"%s\" doesn't exist.", __func__, tablename); 444 444 return 0; 445 445 } … … 448 448 g_free(query); 449 449 450 osync_trace(TRACE_EXIT, "%s: table \"%s\" exists.", __func__, tablename ? tablename : "nil");450 osync_trace(TRACE_EXIT, "%s: table \"%s\" exists.", __func__, tablename); 451 451 return 1; 452 452 } … … 465 465 osync_bool osync_db_bind_blob(OSyncDB *db, const char *query, const char *data, unsigned int size, OSyncError **error) 466 466 { 467 osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %u, %p)", __func__, db, query ? query : "nil", data ? data : "nil", size, error);467 osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %u, %p)", __func__, db, query, data, size, error); 468 468 469 469 osync_assert(db); … … 506 506 sqlite3_finalize(sqlite_stmt); 507 507 } 508 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");508 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 509 509 return FALSE; 510 510 } … … 522 522 int osync_db_get_blob(OSyncDB *db, const char *query, char **data, unsigned int *size, OSyncError **error) 523 523 { 524 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p, %p)", __func__, db, query ? query : "nil", data, size, error);524 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p, %p)", __func__, db, query, data, size, error); 525 525 526 526 osync_assert(db); … … 577 577 sqlite3_finalize(sqlite_stmt); 578 578 } 579 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil");579 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 580 580 return -1; 581 581 } trunk/opensync/engine/opensync_engine.c
r2364 r2368 109 109 OSyncObjFormat *detectedFormat = NULL; 110 110 111 osync_trace(TRACE_INTERNAL, "Received change %s, changetype %i, format %s, objtype %s from member %lli", uid ? uid : "nil", changetype, format ? format : "nil", objtype ? objtype : "nil", memberid);111 osync_trace(TRACE_INTERNAL, "Received change %s, changetype %i, format %s, objtype %s from member %lli", uid, changetype, format, objtype, memberid); 112 112 113 113 OSyncData *data = osync_change_get_data(change); … … 133 133 } 134 134 135 osync_trace(TRACE_INTERNAL, "detected format %s and objtype %s", osync_objformat_get_name(detectedFormat) ? osync_objformat_get_name(detectedFormat) : "nil", detected_objtype ? detected_objtype : "nil");135 osync_trace(TRACE_INTERNAL, "detected format %s and objtype %s", osync_objformat_get_name(detectedFormat), detected_objtype); 136 136 137 137 /* ... only if the objtype is supported by one of the object engines we change the objtype of the change-entry (change). */ … … 139 139 osync_change_set_objtype(change, osync_objformat_get_objtype(detectedFormat)); 140 140 else 141 osync_trace(TRACE_INTERNAL, "objtype %s is not supported in this group.", detected_objtype ? detected_objtype : "nil");141 osync_trace(TRACE_INTERNAL, "objtype %s is not supported in this group.", detected_objtype); 142 142 143 143 } … … 184
