From: <svn...@op...> - 2010-07-01 03:47:40
|
Author: cdfrey Date: Thu Jul 1 05:47:31 2010 New Revision: 6050 URL: http://www.opensync.org/changeset/6050 Log: Fixed COUNT=0 bug when a forever recurring rule is converted ical->xml->ical 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. Modified: format-plugins/vformat/src/xmlformat-recurrence.c Modified: format-plugins/vformat/src/xmlformat-recurrence.c ============================================================================== --- format-plugins/vformat/src/xmlformat-recurrence.c Tue Jun 29 04:17:12 2010 (r6049) +++ format-plugins/vformat/src/xmlformat-recurrence.c Thu Jul 1 05:47:31 2010 (r6050) @@ -494,10 +494,6 @@ 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) |