Changeset 1482
- Timestamp:
- 11/28/06 22:07:20 (2 years ago)
- Location:
- plugins/syncml/src
- Files:
-
- 4 modified
-
syncml-http-server (modified) (1 diff)
-
syncml-obex-client (modified) (1 diff)
-
syncml_plugin.c (modified) (4 diffs)
-
syncml_plugin.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plugins/syncml/src/syncml-http-server
r1456 r1482 19 19 <onlyreplace>0</onlyreplace> 20 20 21 <!-- Workaround around for mobile phones which only use local timestamps and _no_ UTC timestamps! --> 22 <onlyLocaltime>0</onlyLocaltime> 23 21 24 <!-- Sets the maximum allowed size in bytes of incoming messages (some device need this option set). Example: 10000 --> 22 25 <recvLimit>0</recvLimit> -
plugins/syncml/src/syncml-obex-client
r1456 r1482 33 33 <!-- Never send ADD command, but send REPLACE (not needed normally) --> 34 34 <onlyreplace>0</onlyreplace> 35 36 <!-- Workaround around for mobile phones which only use local timestamps and _no_ UTC timestamps! --> 37 <onlyLocaltime>0</onlyLocaltime> 35 38 36 39 <!-- Sets the maximum allowed size in bytes of incoming messages (some device need this option set). Example: 10000 --> -
plugins/syncml/src/syncml_plugin.c
r1456 r1482 117 117 osync_change_set_objformat_string(change, "memo"); 118 118 } 119 120 osync_change_set_data(change, data, size, TRUE); 119 120 /* XXX Workaround for mobiles which only handle localtime! */ 121 char *_data = g_strdup(data); 122 if (!strcmp(contenttype, SML_ELEMENT_TEXT_VCAL) && env->onlyLocaltime) { 123 g_free(_data); 124 _data = osync_time_vcal2utc(data); 125 126 } 127 128 osync_change_set_data(change, _data, size, TRUE); 121 129 osync_change_set_changetype(change, _to_osync_changetype(type)); 122 130 osync_context_report_change((OSyncContext *)userdata, change); 131 g_free(_data); 132 123 133 } else 124 134 osync_context_report_success((OSyncContext *)userdata); … … 457 467 env->useStringtable = atoi(str); 458 468 } 459 469 470 /* XXX Workaround for mobiles which only handle localtime! */ 471 if (!xmlStrcmp(cur->name, (const xmlChar *)"onlyLocaltime")) { 472 env->onlyLocaltime = atoi(str); 473 } 474 460 475 if (!xmlStrcmp(cur->name, (const xmlChar *)"onlyreplace")) { 461 476 env->onlyReplace = atoi(str); … … 778 793 env->maxObjSize = atoi(str); 779 794 } 795 796 /* XXX Workaround for mobiles which only handle localtime! */ 797 if (!xmlStrcmp(cur->name, (const xmlChar *)"onlyLocaltime")) { 798 env->onlyLocaltime = atoi(str); 799 } 780 800 781 801 if (!xmlStrcmp(cur->name, (const xmlChar *)"contact_db")) { … … 1212 1232 tracer->change = change; 1213 1233 tracer->context = context; 1214 1215 1216 if (!smlDsSessionQueueChange(env->calendarSession, _get_changetype(change), osync_change_get_uid(change), osync_change_get_data(change), osync_change_get_datasize(change), _format_to_contenttype(change), _recv_change_reply, tracer, &error)) 1234 1235 /* XXX Workaround for mobiles which only handle localtime! */ 1236 char *calentry = g_strdup(osync_change_get_data(change)); 1237 if (env->onlyLocaltime) { 1238 g_free(calentry); 1239 const char *orig_stamp = osync_change_get_data(change); 1240 calentry = osync_time_vcal2localtime(orig_stamp); 1241 } 1242 1243 if (!smlDsSessionQueueChange(env->calendarSession, _get_changetype(change), osync_change_get_uid(change), calentry, strlen(calentry), _format_to_contenttype(change), _recv_change_reply, tracer, &error)) { 1244 g_free(calentry); 1217 1245 goto error; 1246 } 1218 1247 contexts[i] = NULL; 1248 g_free(calentry); 1249 1219 1250 } 1220 1251 } -
plugins/syncml/src/syncml_plugin.h
r1420 r1482 62 62 SmlBool useStringtable; 63 63 SmlBool onlyReplace; 64 SmlBool onlyLocaltime; 64 65 SmlTransportObexClientType type; 65 66 unsigned int port;
