res_calendar_icalendar: Properly handle recurring events
[asterisk/asterisk.git] / res / res_calendar_icalendar.c
index 3348060..795a35b 100644 (file)
@@ -333,7 +333,7 @@ static void icalendar_add_event(icalcomponent *comp, struct icaltime_span *span,
        start_time = icaltime_current_time_with_zone(icaltimezone_get_utc_timezone());
        end_time = icaltime_current_time_with_zone(icaltimezone_get_utc_timezone());
        end_time.second += pvt->owner->timeframe * 60;
-       icaltime_normalize(end_time);
+       end_time = icaltime_normalize(end_time);
 
        for (iter = icalcomponent_get_first_component(pvt->data, ICAL_VEVENT_COMPONENT);
             iter;