Skip to content

Commit

Permalink
deliver_merge_reply: look at more than the first recurrence of each R…
Browse files Browse the repository at this point in the history
…RULE
  • Loading branch information
brong committed Jun 23, 2023
1 parent cf97a1d commit 27722dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions imap/itip_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ static const char *deliver_merge_reply(icalcomponent *ical, // current iCalenda
/* Lookup RECURRENCE-ID in RDATE hash table */
if (!hash_lookup(icaltime_as_ical_string(recurid), &rdate_table)) {
int i, valid = 0, size = ptrarray_size(&rrules);
icaltimetype this;

/* Does it correspond to an occurrence of an RRULE? */
for (i = 0; !valid && i < size; i++) {
Expand All @@ -525,8 +526,11 @@ static const char *deliver_merge_reply(icalcomponent *ical, // current iCalenda
icalrecur_iterator_new(*rrule, dtstart);

icalrecur_iterator_set_start(ritr, recurid);
valid = !icaltime_compare(recurid,
icalrecur_iterator_next(ritr));
for (this = icalrecur_iterator_next(ritr);
!valid && !icaltime_is_null_time(this);
this = icalrecur_iterator_next(ritr)) {
valid = !icaltime_compare(recurid, this);
}
icalrecur_iterator_free(ritr);
}

Expand Down

0 comments on commit 27722dc

Please sign in to comment.