lib: added handling and checks for negative VEVENT recurrence values
commit1c19fb0aea49c095b8def02d4ca9290d56ff7ecc
authorChris Frey <cdfrey@foursquare.net>
Thu, 24 May 2012 05:59:35 +0000 (24 01:59 -0400)
committerChris Frey <cdfrey@foursquare.net>
Thu, 24 May 2012 06:04:51 +0000 (24 02:04 -0400)
tree751507ace685caf00904a6d2744ad57096d18b77
parenta3bbbac850fb68c6dc7ff6321272b7e2c87b8c38
lib: added handling and checks for negative VEVENT recurrence values

According to RFC 2445, some of the values in recurrence fields can
be negative to represent concepts like the "last Monday of the month"
and the BlackBerry does not support such configurations.

In some instances, we can fake it by converting to "4th week of month"
instead, and issue a warning message.  In other cases, we have to
reset to some anchor value and issue an error.

The vcard/vevent MIME converter routines are currently designed to
parse incoming records without failing, whenever possible, and issue
messages if there were problems.  Someday, better error control
should be added, but this works in most cases, and is especially
handy in the case of opensync syncing, where crashing a sync based
on a parsing error is a real nuisance and can require some work
to recover from, if it slips into "slow_sync" mode.
src/vevent.cc
src/vevent.h