Changeset 3581
- Timestamp:
- 08/22/08 15:40:37 (3 months ago)
- Location:
- plugins/syncml/src
- Files:
-
- 2 modified
-
syncml_callbacks.c (modified) (3 diffs)
-
syncml_common.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plugins/syncml/src/syncml_callbacks.c
r3571 r3581 50 50 switch (type) { 51 51 case SML_DATA_SYNC_EVENT_ERROR: 52 smlErrorDuplicate(&error, &locerror); 52 env->abort =TRUE; 53 smlErrorDuplicate(&locerror, &error); 53 54 smlErrorDeref(&error); 54 55 goto error; … … 59 60 break; 60 61 case SML_DATA_SYNC_EVENT_FINISHED: 61 if (dsObject == env->dsObject1 && env->dsObject2) { 62 if (!smlDataSyncInit(env->dsObject2, &locerror)) 63 goto error; 64 if (!smlDataSyncRun(env->dsObject2, &locerror)) 65 goto error; 66 } else { 67 /* This is the real end of the sync process and 68 * so it is a good idea to commit the changes here 69 * and not earlier because now the remote peer 70 * commits too. 71 */ 72 o = env->databases; 73 for (; o; o = o->next) { 74 SmlDatabase *database = o->data; 75 g_assert(database->commitCtx); 76 report_success_on_context(&(database->commitCtx)); 62 if (!env->abort) 63 { 64 if (dsObject == env->dsObject1 && env->dsObject2) { 65 if (!smlDataSyncInit(env->dsObject2, &locerror)) 66 goto error; 67 if (!smlDataSyncRun(env->dsObject2, &locerror)) 68 goto error; 69 } else { 70 /* This is the real end of the sync process and 71 * so it is a good idea to commit the changes here 72 * and not earlier because now the remote peer 73 * commits too. 74 */ 75 o = env->databases; 76 for (; o; o = o->next) { 77 SmlDatabase *database = o->data; 78 g_assert(database->commitCtx); 79 report_success_on_context(&(database->commitCtx)); 80 } 77 81 } 78 79 /* a real disconnet happens */80 if (env->disconnectCtx)81 report_success_on_context(&(env->disconnectCtx));82 82 } 83 84 /* a real disconnet happens */ 85 if (env->disconnectCtx) 86 report_success_on_context(&(env->disconnectCtx)); 83 87 break; 84 88 case SML_DATA_SYNC_EVENT_GOT_ALL_ALERTS: … … 116 120 osync_trace(TRACE_INTERNAL, "%s: Cleaning up because of an error ...", __func__); 117 121 OSyncError *oserror = NULL; 118 osync_error_set(&oserror, OSYNC_ERROR_GENERIC, smlErrorPrint(& error));122 osync_error_set(&oserror, OSYNC_ERROR_GENERIC, smlErrorPrint(&locerror)); 119 123 120 124 if (env->connectCtx) -
plugins/syncml/src/syncml_common.h
r3579 r3581 95 95 /* libsyncml state management */ 96 96 97 SmlBool abort; 97 98 SmlDataSyncEventType state1; 98 99 SmlDataSyncEventType state2;
