Changeset 3586

Show
Ignore:
Timestamp:
08/22/08 18:19:32 (3 months ago)
Author:
bellmich
Message:

If the libsyncml is very fast and there are no changes at the server side
the it can happen that the event GOT_ALL_CHANGES is received before the
OpenSync? library requests the changes.

If this happens then the syncml plugin immediately reports success on the
used context.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/syncml/src/syncml_ds_client.c

    r3579 r3586  
    8484        SmlPluginEnv *env = database->env; 
    8585 
    86         database->getChangesCtx = ctx; 
    87         osync_context_ref(database->getChangesCtx); 
     86        if (env->state1 >= SML_DATA_SYNC_EVENT_GOT_ALL_CHANGES) { 
     87                report_success_on_context(&(ctx)); 
     88        } else { 
     89                database->getChangesCtx = ctx; 
     90                osync_context_ref(database->getChangesCtx); 
     91        } 
    8892 
    8993        smlDataSyncRegisterChangeCallback(env->dsObject1, _recv_change, env);