[Asterisk-code-review] res calendar icalendar: Filter out occurrences superceded by... (asterisk[13])

Sean Bright asteriskteam at digium.com
Tue Oct 3 11:10:05 CDT 2017


Sean Bright has uploaded a new patch set (#2) to the change originally created by Benoît Dereck-Tricot. ( https://gerrit.asterisk.org/6625 )

Change subject: res_calendar_icalendar: Filter out occurrences superceded by another VEVENT
......................................................................

res_calendar_icalendar: Filter out occurrences superceded by another VEVENT

When we are loading the calendars, we call libical's
icalcomponent_foreach_recurrence method for each VEVENT component that
we have in our calendar.

That method has no knowledge concerning the existence of the other
VEVENT components and will feed our callback with all ocurrences
matching the requested time span.

The occurrences generated by icalcomponent_foreach_recurrence while
expanding a recurring VEVENT's RRULE and RDATE properties can be
superceded by an other VEVENT sharing the same UID.

I use an external iterator (in libical terminology) to avoid messing
with the internal ones from the calling function, and search for
VEVENTS which could supersede the current occurrence.

The event which can invalidate this occurence needs to have:

- the same UID as our recurrent component (comp)
- a RECURRENCE-ID property, which represents the start time of this
  occurrence

If one component is found, just clean and return.

ASTERISK-27296 #close

Change-Id: I8587ae3eaa765af7cb21eda3b6bf84e8a1c87af8
---
M res/res_calendar_icalendar.c
1 file changed, 33 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/6625/2
-- 
To view, visit https://gerrit.asterisk.org/6625
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8587ae3eaa765af7cb21eda3b6bf84e8a1c87af8
Gerrit-Change-Number: 6625
Gerrit-PatchSet: 2
Gerrit-Owner: Benoît Dereck-Tricot <benoit.dereck-tricot at eyepea.eu>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171003/df247b66/attachment.html>


More information about the asterisk-code-review mailing list