summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2012-06-29 16:56:13 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2012-06-29 16:56:13 +0200
commit8b8696346660b82da961357e61c2b4d1af51d617 (patch)
tree3d23d5667130f9a79640eb93c32b5dafe0ad7c26
parentc81a7fceafd6e6dafaeed54f6666a8b15a551100 (diff)
Funambol: ignore UID
Funambol's OneMedia sends UID, but not RECURRENCE-ID. That becomes a problem when multiple events of the same event series are added to a backend which follows the iCalendar 2.0 standard (CalDAV, EDS, KDE), because these events all look like the master event, and there can be only one of those. SyncEvolution now strips the UID from all events coming from any Funambol server (regardless of the version). If a future Funambol server release adds support for both UID and RECURRENCE-ID, then SyncEvolution will have to be updated to take advantage of the improved server. Because the RECURRENCE-ID is also getting stripped (despite not being set at the moment), SyncEvolution should continue to work as it does now even if the server changes. It would have been nice to limit this workaround to affected Funambol server versions, but an inquiry on the Funambol mailing list didn't get a reply, therefore SyncEvolution is playing it safe and assumes that all future Funambol releases will have the same problem.
-rw-r--r--src/syncevo/SyncContext.cpp3
-rw-r--r--src/syncevo/configs/remoterules/client/03funambol.xml7
-rw-r--r--src/syncevo/configs/scripting/11calendar.xml7
3 files changed, 16 insertions, 1 deletions
diff --git a/src/syncevo/SyncContext.cpp b/src/syncevo/SyncContext.cpp
index 2537abcf..6ba5b901 100644
--- a/src/syncevo/SyncContext.cpp
+++ b/src/syncevo/SyncContext.cpp
@@ -2357,7 +2357,8 @@ void SyncContext::getConfigXML(string &xml, string &configname)
" delayedabort = FALSE;\n"
" INTEGER alarmTimeToUTC;\n"
" alarmTimeToUTC = FALSE;\n"
- " // for VCALENDAR_COMPARE_SCRIPT: don't use UID by default\n"
+ " INTEGER stripUID;\n"
+ " stripUID = FALSE;\n"
" ]]></sessioninitscript>\n";
ostringstream clientorserver;
diff --git a/src/syncevo/configs/remoterules/client/03funambol.xml b/src/syncevo/configs/remoterules/client/03funambol.xml
new file mode 100644
index 00000000..6f8e2d28
--- /dev/null
+++ b/src/syncevo/configs/remoterules/client/03funambol.xml
@@ -0,0 +1,7 @@
+ <remoterule name="Funambol">
+ <manufacturer>Funambol</manufacturer>
+ <model>DS Server*</model>
+ <rulescript><![CDATA[
+ stripUID = TRUE;
+ ]]></rulescript>
+ </remoterule>
diff --git a/src/syncevo/configs/scripting/11calendar.xml b/src/syncevo/configs/scripting/11calendar.xml
index 18b6d363..613f061d 100644
--- a/src/syncevo/configs/scripting/11calendar.xml
+++ b/src/syncevo/configs/scripting/11calendar.xml
@@ -4,6 +4,13 @@
STRING MATCHES[];
STRING CAT,CN,EM;
INTEGER i;
+ // Remove UID/RECURRENCE-ID from servers which do not support
+ // the semantic properly (for example, Funambol supports
+ // UID but drops RECURRENCE-ID, causing conflicts).
+ if (SESSIONVAR("stripUID")) {
+ UID = UNASSIGNED;
+ ORIGSTART = UNASSIGNED;
+ }
// make sure we have all trailing and leading spaces eliminated
DESCRIPTION=NORMALIZED(DESCRIPTION);
SUMMARY=NORMALIZED(SUMMARY);