From: <svn...@op...> - 2009-04-03 13:48:57
|
Author: bellmich Date: Fri Apr 3 15:48:53 2009 New Revision: 1027 URL: http://libsyncml.opensync.org/changeset/1027 Log: added patch from Henrik to fix ticket #222 Modified: trunk/libsyncml/objects/sml_ds_server.c trunk/libsyncml/sml_support.c trunk/tests/CMakeLists.txt Modified: trunk/libsyncml/objects/sml_ds_server.c ============================================================================== --- trunk/libsyncml/objects/sml_ds_server.c Fri Apr 3 15:47:33 2009 (r1026) +++ trunk/libsyncml/objects/sml_ds_server.c Fri Apr 3 15:48:53 2009 (r1027) @@ -79,9 +79,9 @@ if (((ctx->type != SML_CHANGE_ADD || smlStatusGetClass(ctx->status) != SML_ERRORCLASS_SUCCESS) && !ctx->newuid) || dsession->server->servertype == SML_DS_CLIENT) { ctx->callback(dsession, ctx->status, NULL, ctx->userdata); - _write_context_free(ctx); - dsession->pendingMaps = g_list_remove(dsession->pendingMaps, ctx); + _write_context_free(ctx); + smlTrace(TRACE_EXIT, "%s", __func__); return; } @@ -93,9 +93,8 @@ ctx->callback(dsession, ctx->status, ctx->newuid, ctx->userdata); - _write_context_free(ctx); - dsession->pendingMaps = g_list_remove(dsession->pendingMaps, ctx); + _write_context_free(ctx); // Now there are no more MapItems ... do some fancy callback. Some applications will love it ;) if (dsession->recvEventCallback && !dsession->pendingMaps) { Modified: trunk/libsyncml/sml_support.c ============================================================================== --- trunk/libsyncml/sml_support.c Fri Apr 3 15:47:33 2009 (r1026) +++ trunk/libsyncml/sml_support.c Fri Apr 3 15:48:53 2009 (r1027) @@ -36,6 +36,7 @@ #include <libxml/parser.h> GPrivate* current_tabs = NULL; +GPrivate* thread_id = NULL; #define G_ERRORCHECK_MUTEXES @@ -135,9 +136,13 @@ pid_t pid; const char *endline; #ifdef _WIN32 +#ifdef PTW32_VERSION + id = (unsigned long int)pthread_self().p; +#else if (!thread_id) thread_id = g_private_new (NULL); id = GPOINTER_TO_INT(thread_id); +#endif pid = _getpid(); endline = "\r\n"; #else Modified: trunk/tests/CMakeLists.txt ============================================================================== --- trunk/tests/CMakeLists.txt Fri Apr 3 15:47:33 2009 (r1026) +++ trunk/tests/CMakeLists.txt Fri Apr 3 15:48:53 2009 (r1027) @@ -70,3 +70,5 @@ ENDIF ( ENABLE_BASE64_TEST ) ENDIF( ENABLE_UNIT_TEST ) + +CONFIGURE_FILE("coverage.sh.cmake" "${CMAKE_CURRENT_BINARY_DIR}/coverage.sh") |