From: <svn...@op...> - 2009-03-18 10:51:02
|
Author: bellmich Date: Wed Mar 18 11:50:50 2009 New Revision: 989 URL: http://libsyncml.opensync.org/changeset/989 Log: added automatic localtime enforcement if the remote device sends a device information without UTC support Modified: trunk/libsyncml/data_sync_api/data_sync_devinf.c Modified: trunk/libsyncml/data_sync_api/data_sync_devinf.c ============================================================================== --- trunk/libsyncml/data_sync_api/data_sync_devinf.c Tue Mar 17 19:15:41 2009 (r988) +++ trunk/libsyncml/data_sync_api/data_sync_devinf.c Wed Mar 18 11:50:50 2009 (r989) @@ -744,9 +744,22 @@ */ goto error; } else { - /* check if there was an error during DevInfLoadRemote */ + /* check if there was an error during DevInfLoadRemote + * or dsObject->handleRemoteDevInfCallback + */ if (*error != NULL) goto error; + /* if the remote peer does not support UTC + * then dsObject must be configured properly + */ + if (dsObject->remoteDevInf && + !smlDevInfSupportsUTC(dsObject->remoteDevInf)) + { + smlTrace(TRACE_INTERNAL, + "%s: enforcing localtime because of remote DevInf", + __func__); + dsObject->onlyLocaltime = TRUE; + } } smlTrace(TRACE_EXIT, "%s - TRUE", __func__); |