From: <svn...@op...> - 2009-05-12 13:09:04
|
Author: bellmich Date: Tue May 12 15:08:49 2009 New Revision: 1083 URL: http://libsyncml.opensync.org/changeset/1083 Log: If a slow-sync alert is initiated and the remote peer did not request it then the function must return false to trigger a status 508 (REFRESH_REQUIRED). If the requested alert type is not known then there is no need for a status and the function returns true. This can happen if the remote peer did not trigger the client via a SAN (e.g. OMA DS client over HTTP). Modified: trunk/libsyncml/data_sync_api/data_sync_client.c Modified: trunk/libsyncml/data_sync_api/data_sync_client.c ============================================================================== --- trunk/libsyncml/data_sync_api/data_sync_client.c Tue May 12 14:50:22 2009 (r1082) +++ trunk/libsyncml/data_sync_api/data_sync_client.c Tue May 12 15:08:49 2009 (r1083) @@ -241,10 +241,20 @@ smlDataSyncChangeCallback, datastore); } + /* If a slow-sync alert is initiated and the remote peer + * did not request it then the function must return false + * to trigger a status 508 (REFRESH_REQUIRED). + * If the requested alert type is not known then there + * is no need for a status and the function returns true. + * This can happen if the remote peer did not trigger + * the client via a SAN (e.g. OMA DS client over HTTP). + */ SmlBool ret = TRUE; if (alertType == SML_ALERT_SLOW_SYNC && - alertType != type) + alertType != type && + type != SML_ALERT_UNKNOWN) { ret = FALSE; + } smlTrace(TRACE_EXIT, "%s: %i", __func__, ret); return ret; |