<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6244">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_calendar_icalendar: Properly handle recurring events<br><br>When looking for recurring events, use the correct end time based on the<br>configured 'timeframe.'<br><br>ASTERISK-27174 #close<br>Reported by: Mark Thompson<br><br>Change-Id: Id90c3cfc79d561a5521d79be176683e225f2edef<br>---<br>M res/res_calendar_icalendar.c<br>1 file changed, 4 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/44/6244/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c<br>index 3348060..d4e0580 100644<br>--- a/res/res_calendar_icalendar.c<br>+++ b/res/res_calendar_icalendar.c<br>@@ -313,6 +313,7 @@<br> static void icalendar_update_events(struct icalendar_pvt *pvt)<br> {<br> struct icaltimetype start_time, end_time;<br>+ struct icaldurationtype recur_duration;<br> icalcomponent *iter;<br> <br> if (!pvt) {<br>@@ -330,9 +331,10 @@<br> return;<br> }<br> <br>+ recur_duration = icaldurationtype_from_int(pvt->owner->timeframe * 60);<br>+<br> start_time = icaltime_current_time_with_zone(icaltimezone_get_utc_timezone());<br>- end_time = icaltime_current_time_with_zone(icaltimezone_get_utc_timezone());<br>- end_time.second += pvt->owner->timeframe * 60;<br>+ end_time = icaltime_add(start_time, recur_duration);<br> icaltime_normalize(end_time);<br> <br> for (iter = icalcomponent_get_first_component(pvt->data, ICAL_VEVENT_COMPONENT);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6244">change 6244</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6244"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Id90c3cfc79d561a5521d79be176683e225f2edef </div>
<div style="display:none"> Gerrit-Change-Number: 6244 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>