Changeset 3583
- Timestamp:
- 08/22/08 16:42:09 (3 months ago)
- Files:
-
- 1 modified
-
plugins/syncml/src/syncml_callbacks.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/syncml/src/syncml_callbacks.c
r3581 r3583 62 62 if (!env->abort) 63 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 { 64 if (!env->dsObject2 || dsObject == env->dsObject2) { 70 65 /* This is the real end of the sync process and 71 66 * so it is a good idea to commit the changes here … … 92 87 if (env->connectCtx) 93 88 report_success_on_context(&(env->connectCtx)); 89 if (env->dsObject2) 90 { 91 /* If this is the first connection of an 92 * OMA DS client then we send an empty sync. 93 */ 94 if (!smlDataSyncSendChanges(env->dsObject1, &locerror)) 95 goto error; 96 } 94 97 } else { 95 98 if (!smlDataSyncSendChanges(env->dsObject2, &locerror)) … … 160 163 161 164 SmlPluginEnv *env = userdata; 162 SmlDatabase *database = get_database_from_source(env, source, error); 163 if (!database) 164 goto error; 165 166 /* locate alert type of sink */ 167 if (osync_objtype_sink_get_slowsync(database->sink)) 168 type = SML_ALERT_SLOW_SYNC; 169 else 165 166 if (env->dsObject2 && env->dsObject2 == dsObject) 167 { 168 /* If this is the second connection of an OMA DS client 169 * then first connection should be successful and so the 170 * second connection should be no SLOW-SYNC. 171 */ 170 172 type = SML_ALERT_TWO_WAY; 173 } else { 174 SmlDatabase *database = get_database_from_source(env, source, error); 175 if (!database) 176 goto error; 177 178 /* locate alert type of sink */ 179 if (osync_objtype_sink_get_slowsync(database->sink)) 180 type = SML_ALERT_SLOW_SYNC; 181 else 182 type = SML_ALERT_TWO_WAY; 183 } 171 184 172 185 osync_trace(TRACE_EXIT, "%s - %d", __func__, type);
