On Mon, 2011-02-21 at 17:28 +0100, Carlos Martín Nieto wrote: > Hi, > > Dealing with the error I posted about on another thread, I found that > Google is giving me some recurring events with an interval of -1, which > causes evo to search for all years from 2011 to -1, when it errors out > because it's no longer a valid time_t (which I guess also explains why > it sometimes seems to stop responding for a bit). > > I'm not sure how I managed to create them, but the Google calendar web > interface manages to display them correctly. As a fix for this > behaviour, I've changed the library to use the absolute value (which > also has the added advantage that these entries are now displayed). > > I can push the change in myself if people are in favour, but I wanted > to ask, as this could be considered quite wrong.
+1 from me
My only quibble is that any program should report on a client that
creates bogus data, so I should like to see some kind of warning message
written in the logs at this point.
Cheers,
Andrew.
>
> cmn
>
> ---
> calendar/libecal/e-cal-recur.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/calendar/libecal/e-cal-recur.c
> b/calendar/libecal/e-cal-recur.c
> index 3c30618..87e430c 100644
> --- a/calendar/libecal/e-cal-recur.c
> +++ b/calendar/libecal/e-cal-recur.c
> @@ -996,7 +996,8 @@ e_cal_recur_from_icalproperty (icalproperty *prop,
> gboolean exception,
> ir = icalproperty_get_rrule (prop);
>
> r->freq = ir.freq;
> - r->interval = ir.interval;
> + /* Invervals of -1 have been spotted in the wild (Google) */
> + r->interval = abs(ir.interval);
>
> r->enddate = e_cal_recur_obtain_enddate (&ir, prop, zone,
> convert_end_date);
>
> _______________________________________________
> evolution-hackers mailing list
> [email protected]
> To change your list options or unsubscribe, visit ...
> http://mail.gnome.org/mailman/listinfo/evolution-hackers
--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
The most common form of marriage proposal: "YOU'RE WHAT!?"
------------------------------------------------------------------------
signature.asc
Description: This is a digitally signed message part
_______________________________________________ evolution-hackers mailing list [email protected] To change your list options or unsubscribe, visit ... http://mail.gnome.org/mailman/listinfo/evolution-hackers
