|
From: Chris F. <cd...@fo...> - 2010-07-01 03:48:14
|
Hi,
When a VEVENT that has a recurring rule with no UNTIL or COUNT fields
is converted from ICAL to xmlformat and back, it suddenly gains an
extra COUNT=0 setting that was not there before.
Comparing against the schema for calendars in the xmlformat plugin
in the schemas/xmlformat-calendar.xsd file:
<!-- Basic vCalendar Recurence Rule -->
<xsd:complexType name="RecurrenceRule">
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="Frequency" type="BasicRecur
renceFreq"/>
<xsd:element minOccurs="0" maxOccurs="1" name="Until" type="xsd:string"/>
<xsd:element minOccurs="0" maxOccurs="1" name="Count" type="PositiveInteger"/>
This PositiveInteger rule excludes 0.
According to my understanding of the RFC 2445, to have a "forever"
recurring rule, COUNT=0 is never used... the COUNT is just dropped.
I've applied the following patch to the vformat plugin.
- Chris
--- a/src/xmlformat-recurrence.c
+++ b/src/xmlformat-recurrence.c
@@ -494,10 +494,6 @@ OSyncXMLField *convert_ical_rrule_to_xml(OSyncXMLFormat *xmlformat, VFormatAttri
if (rrules[3].value == NULL)
rrules[3].value = "1";
- // set count to 0, if neither count nor until were set before
- if (rrules[1].value == NULL && rrules[2].value == NULL)
- rrules[2].value = "0";
-
int i;
for (i = 0; i <= 13; i++) {
if (rrules[i].value != NULL)
|