[evolution-data-server] Bug 691456 - Incorrectly applied MONTHLY BYMONTHDAY RRULE rule
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 691456 - Incorrectly applied MONTHLY BYMONTHDAY RRULE rule
- Date: Wed, 15 Apr 2015 14:18:05 +0000 (UTC)
commit 453572c367780e21e82ff67ac36674414662fb80
Author: Milan Crha <mcrha redhat com>
Date: Wed Apr 15 16:15:34 2015 +0200
Bug 691456 - Incorrectly applied MONTHLY BYMONTHDAY RRULE rule
calendar/libecal/e-cal-recur.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/calendar/libecal/e-cal-recur.c b/calendar/libecal/e-cal-recur.c
index 9e090dd..645cdf5 100644
--- a/calendar/libecal/e-cal-recur.c
+++ b/calendar/libecal/e-cal-recur.c
@@ -515,7 +515,7 @@ static ECalRecurVTable cal_obj_monthly_vtable = {
cal_obj_bymonth_filter,
NULL, /* BYWEEKNO is only applicable to YEARLY frequency. */
NULL, /* BYYEARDAY is not useful in a MONTHLY frequency. */
- cal_obj_bymonthday_expand,
+ cal_obj_bymonthday_filter,
cal_obj_byday_expand_monthly,
cal_obj_byhour_expand,
cal_obj_byminute_expand,
@@ -1780,7 +1780,7 @@ cal_obj_generate_set_monthly (RecurData *recur_data,
ECalRecurVTable *vtable,
CalObjTime *occ)
{
- GArray *occs, *occs2;
+ GArray *occs;
/* We start with just the one time in each set. */
occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
@@ -1793,14 +1793,8 @@ cal_obj_generate_set_monthly (RecurData *recur_data,
* then we would lose the occurrences generated by BYMONTHDAY, and
* instead have repetitions of the occurrences from BYDAY. */
if (recur_data->recur->bymonthday && recur_data->recur->byday) {
- occs2 = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs2, occs->data, occs->len);
-
+ occs = (*vtable->byday_filter) (recur_data, occs);
occs = (*vtable->bymonthday_filter) (recur_data, occs);
- occs2 = (*vtable->byday_filter) (recur_data, occs2);
-
- g_array_append_vals (occs, occs2->data, occs2->len);
- g_array_free (occs2, TRUE);
} else {
occs = (*vtable->bymonthday_filter) (recur_data, occs);
occs = (*vtable->byday_filter) (recur_data, occs);
@@ -2959,8 +2953,7 @@ cal_obj_bymonthday_filter (RecurData *recur_data,
days_in_month = time_days_in_month (
occ->year,
occ->month);
- if (recur_data->neg_monthdays[days_in_month + 1
- - occ->day])
+ if (recur_data->neg_monthdays[days_in_month + 1 - occ->day])
g_array_append_vals (new_occs, occ, 1);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]