Changeset 2364
- Timestamp:
- 07/25/07 08:49:45 (1 year ago)
- Files:
-
- trunk/formats/file.c (modified) (2 diffs)
- trunk/formats/xmlformat-doc.c (modified) (5 diffs)
- trunk/formats/xmlformat.c (modified) (14 diffs)
- 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)
- trunk/tools/osyncplugin.c (modified) (3 diffs)
- trunk/tools/osynctest.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/formats/file.c
r1955 r2364 39 39 osync_assert(leftfile->path); 40 40 41 osync_trace(TRACE_INTERNAL, "Comparing %s and %s", leftfile->path , rightfile->path);41 osync_trace(TRACE_INTERNAL, "Comparing %s and %s", leftfile->path ? leftfile->path : "nil", rightfile->path ? rightfile->path : "nil"); 42 42 43 43 … … 203 203 error: 204 204 205 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) );205 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 206 206 return FALSE; 207 207 } trunk/formats/xmlformat-doc.c
r2260 r2364 96 96 OSyncObjFormat *format = osync_objformat_new(name, objtype, &error); 97 97 if (!format) { 98 osync_trace(TRACE_ERROR, "Unable to register format: %s", osync_error_print(&error) );98 osync_trace(TRACE_ERROR, "Unable to register format: %s", osync_error_print(&error) ? osync_error_print(&error) : "nil"); 99 99 osync_error_unref(&error); 100 100 return FALSE; … … 133 133 134 134 if (!fromformat || !toformat) { 135 osync_trace(TRACE_ERROR, "Unable to register converter for %s->%s, format not found\n", fromname , toname);135 osync_trace(TRACE_ERROR, "Unable to register converter for %s->%s, format not found\n", fromname ? fromname : "nil", toname ? toname : "nil"); 136 136 return FALSE; 137 137 } … … 140 140 conv = osync_converter_new(OSYNC_CONVERTER_CONV, fromformat, toformat, to_xml, &error); 141 141 if (!conv) { 142 osync_trace(TRACE_ERROR, "Unable to register converter: %s", osync_error_print(&error) );142 osync_trace(TRACE_ERROR, "Unable to register converter: %s", osync_error_print(&error) ? osync_error_print(&error) : "nil"); 143 143 osync_error_unref(&error); 144 144 return FALSE; … … 149 149 conv = osync_converter_new(OSYNC_CONVERTER_CONV, toformat, fromformat, from_xml, &error); 150 150 if (!conv) { 151 osync_trace(TRACE_ERROR, "Unable to register converter: %s", osync_error_print(&error) );151 osync_trace(TRACE_ERROR, "Unable to register converter: %s", osync_error_print(&error) ? osync_error_print(&error) : "nil"); 152 152 osync_error_unref(&error); 153 153 return FALSE; … … 160 160 conv = osync_converter_new_detector(plain, fromformat, detect_func, &error); 161 161 if (!conv) { 162 osync_trace(TRACE_ERROR, "Unable to register detector: %s", osync_error_print(&error) );162 osync_trace(TRACE_ERROR, "Unable to register detector: %s", osync_error_print(&error) ? osync_error_print(&error) : "nil"); 163 163 osync_error_unref(&error); 164 164 return FALSE; trunk/formats/xmlformat.c
r2332 r2364 32 32 static osync_bool duplicate_xmlformat(const char *uid, const char *input, unsigned int insize, char **newuid, char **output, unsigned int *outsize, osync_bool *dirty, OSyncError **error) 33 33 { 34 osync_trace(TRACE_ENTRY, "%s(%s, %p, %i, %p, %p, %p, %p, %p)", __func__, uid , input, insize, newuid, output, outsize, dirty, error);34 osync_trace(TRACE_ENTRY, "%s(%s, %p, %i, %p, %p, %p, %p, %p)", __func__, uid ? uid : "nil", input, insize, newuid, output, outsize, dirty, error); 35 35 36 36 char *buffer = NULL; … … 41 41 OSyncXMLFormat *xmlformat = osync_xmlformat_parse(buffer, size, error); 42 42 if (!xmlformat) { 43 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) );43 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 44 44 return FALSE; 45 45 } … … 65 65 xmlformat = osync_xmlformat_parse(buffer, size, error); 66 66 if (!xmlformat) { 67 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) );67 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 68 68 return FALSE; 69 69 } … … 114 114 OSyncXMLFormat *xmlformat = osync_xmlformat_parse((char *)buffer, size, error); 115 115 if (!xmlformat) { 116 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(error) );116 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 117 117 return FALSE; 118 118 } … … 152 152 *data = (char *)osync_xmlformat_new("contact", &error); 153 153 if (!*data) 154 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(&error) );154 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(&error) ? osync_error_print(&error) : "nil"); 155 155 } 156 156 … … 180 180 *data = (char *)osync_xmlformat_new("event", &error); 181 181 if (!*data) 182 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(&error) );182 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(&error) ? osync_error_print(&error) : "nil"); 183 183 } 184 184 … … 208 208 *data = (char *)osync_xmlformat_new("todo", &error); 209 209 if (!*data) 210 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(&error) );210 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(&error) ? osync_error_print(&error) : "nil"); 211 211 } 212 212 … … 235 235 *data = (char *)osync_xmlformat_new("note", &error); 236 236 if (!*data) 237 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(&error) );237 osync_trace(TRACE_ERROR, "%s: %s", __func__, osync_error_print(&error) ? osync_error_print(&error) : "nil"); 238 238 } 239 239 … … 258 258 259 259 const char *revision = osync_xmlfield_get_nth_key_value(xmlfield, 0); 260 osync_trace(TRACE_INTERNAL, "About to convert string %s", revision );260 osync_trace(TRACE_INTERNAL, "About to convert string %s", revision ? revision : "nil"); 261 261 //time_t time = vformat_time_to_unix(revision); 262 262 time_t time = osync_time_vtime2unix(revision, 0); … … 266 266 267 267 error: 268 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) );268 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 269 269 return -1; 270 270 } … … 279 279 format = osync_objformat_new("xmlformat-contact", "contact", &error); 280 280 if (!format) { 281 osync_trace(TRACE_ERROR, "Unable to register format xmlformat: %s", osync_error_print(&error) );281 osync_trace(TRACE_ERROR, "Unable to register format xmlformat: %s", osync_error_print(&error) ? osync_error_print(&error) : "nil"); 282 282 osync_error_unref(&error); 283 283 return FALSE; … … 304 304 format = osync_objformat_new("xmlformat-event", "event", &error); 305 305 if (!format) { 306 osync_trace(TRACE_ERROR, "Unable to register format xmlformat: %s", osync_error_print(&error) );306 osync_trace(TRACE_ERROR, "Unable to register format xmlformat: %s", osync_error_print(&error) ? osync_error_print(&error) : "nil"); 307 307 osync_error_unref(&error); 308 308 return FALSE; … … 329 329 format = osync_objformat_new("xmlformat-todo", "todo", &error); 330 330 if (!format) { 331 osync_trace(TRACE_ERROR, "Unable to register format xmlfomat: %s", osync_error_print(&error) );331 osync_trace(TRACE_ERROR, "Unable to register format xmlfomat: %s", osync_error_print(&error) ? osync_error_print(&error) : "nil"); 332 332 osync_error_unref(&error); 333 333 return FALSE; … … 354 354 format = osync_objformat_new("xmlformat-note", "note", &error); 355 355 if (!format) { 356 osync_trace(TRACE_ERROR, "Unable to register format xmlfomat: %s", osync_error_print(&error) );356 osync_trace(TRACE_ERROR, "Unable to register format xmlfomat: %s", osync_error_print(&error) ? osync_error_print(&error) : "nil"); 357 357 osync_error_unref(&error); 358 358 return FALSE; trunk/opensync/archive/opensync_archive.c
r2295 r2364 41 41 void _osync_archive_trace(void *data, const char *query) 42 42 { 43 osync_trace(TRACE_INTERNAL, "query executed: %s", query );43 osync_trace(TRACE_INTERNAL, "query executed: %s", query ? query : "nil"); 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 , error);60 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, objtype ? objtype : "nil", 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) );91 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);97 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, objtype ? objtype : "nil", 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) );127 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);133 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, objtype ? objtype : "nil", 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) );164 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);176 osync_trace(TRACE_ENTRY, "%s(%s, %p)", __func__, filename ? filename : "nil", 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) );201 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , objtype, data, size, error);253 osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %p, %u, %p)", __func__, archive, uid ? uid : "nil", objtype ? objtype : "nil", 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) );278 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , objtype, data, size, error);295 osync_trace(TRACE_ENTRY, "%s(%p, %s, %s, %p, %p, %p)", __func__, archive, uid ? uid : "nil", objtype ? objtype : "nil", 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) );321 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , objtype, mappingid, memberid, error);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); 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) );374 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);389 osync_trace(TRACE_ENTRY, "%s(%p, %lli, %s, %p)", __func__, archive, id, objtype ? objtype : "nil", 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) );408 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , ids, uids, mappingids, memberids, error);426 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p, %p, %p, %p)", __func__, archive, objtype ? objtype : "nil", 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 , mappingid, memberid);462 osync_trace(TRACE_INTERNAL, "Loaded change with uid %s, mappingid %lli from member %lli", uid ? uid : "nil", 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) );470 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , ids, error);486 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p)", __func__, archive, objtype ? objtype : "nil", 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) );525 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , id, error);541 osync_trace(TRACE_ENTRY, "%s(%p, %s, %lli, %p)", __func__, archive, objtype ? objtype : "nil", 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) );562 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 563 563 return FALSE; 564 564 } … … 575 575 { 576 576 577 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, archive, objtype , error);577 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, archive, objtype ? objtype : "nil", 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) );597 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 598 598 return FALSE; 599 599 } trunk/opensync/client/opensync_client.c
r2013 r2364 450 450 osync_message_read_string(message, &config); 451 451 452 osync_trace(TRACE_INTERNAL, "enginepipe %s, formatdir %s, plugindir %s, pluginname %s", enginepipe , formatdir, plugindir, pluginname);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"); 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) );540 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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) );591 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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) );669 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 );683 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil"); 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) );734 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 );746 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil"); 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) );787 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 );799 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil"); 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) );842 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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) );901 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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) );919 osync_trace(TRACE_INTERNAL, "Searching sink for %s", osync_data_get_objtype(data) ? osync_data_get_objtype(data) : "nil"); 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) );944 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 );956 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil"); 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) );997 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 );1009 osync_trace(TRACE_INTERNAL, "Searching sink for %s", objtype ? objtype : "nil"); 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) );1050 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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) );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"); 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) );1170 osync_trace(TRACE_EXIT_ERROR, "%s: Error while sending error: %s", __func__, osync_error_print(&locerror) ? osync_error_print(&locerror) : "nil"); 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) );1178 osync_trace(TRACE_EXIT_ERROR, "%s: Error while sending error: %s", __func__, osync_error_print(&locerror) ? osync_error_print(&locerror) : "nil"); 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) );1185 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error) ? osync_error_print(&error) : "nil"); 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) );1228 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , plugin, error);1323 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p, %p)", __func__, client, pipe_path ? pipe_path : "nil", 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) );1357 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 1358 1358 return FALSE; 1359 1359 } trunk/opensync/client/opensync_client_proxy.c
r2155 r2364 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) );170 osync_trace(TRACE_INTERNAL, "Error killing old osplugin: %s. Stale pid file?", g_strerror(errno) ? g_strerror(errno) : "nil"); 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) );321 osync_trace(TRACE_INTERNAL, "Received sink: %s", osync_objtype_sink_get_name(sink) ? osync_objtype_sink_get_name(sink) : "nil"); 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 , error);785 osync_trace(TRACE_ENTRY, "%s(%p, %i, %s, %p)", __func__, proxy, type, path ? path : "nil", 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) );913 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 914 914 return FALSE; 915 915 } … … 973 973 974 974 error: 975 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) );975 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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, % p, %p)", __func__, proxy, callback, userdata, formatdir, plugindir, plugin, groupname, configdir, config, error);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); 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) );1023 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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) );1056 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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) );1089 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);1107 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", 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) );1137 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);1143 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", 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) );1172 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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) );1208 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);1214 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", 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) );1243 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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) );1281 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);1287 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", 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) );1317 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);1323 osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %s, %p)", __func__, proxy, callback, userdata, objtype ? objtype : "nil", 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) );1353 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 1354 1354 return FALSE; 1355 1355 } trunk/opensync/client/osplugin.c
r1072 r2364 128 128 osync_client_unref(client); 129 129 130 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error) );130 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(&error) ? osync_error_print(&error) : "nil"); 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
r2123 r2364 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) );349 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 350 350 return -1; 351 351 } trunk/opensync/db/opensync_db.c
r2175 r2364 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 );29 osync_trace(TRACE_INTERNAL, "osync_db query executed: %s", query ? query: "nil"); 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) );44 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error) ? osync_error_print(error) : "nil"); 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 , error);62 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, dbfile ? dbfile : "nil", 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) );69 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, sqlite3_errmsg(db->sqlite3db) ? sqlite3_errmsg(db->sqlite3db) : "nil"); 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) );93 osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, sqlite3_errmsg(db->sqlite3db) ? sqlite3_errmsg(db->sqlite3db) : "nil"); 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 , error);111 osync_trace(TRACE_ENTRY, "%s(%p, %s, %p)", __func__, db, query ? query : "nil", error); 112 112 113 113 osync_assert(db); … …
