mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-16 09:52:24 +00:00
res_calendar_icalendar: Print iCalendar error on parsing failure.
If libical fails to parse a calendar, print the error message it provdes. Resolves: #492
This commit is contained in:
committed by
asterisk-org-access-app[bot]
parent
53fac14e41
commit
f4845f756f
@@ -155,6 +155,10 @@ static icalcomponent *fetch_icalendar(struct icalendar_pvt *pvt)
|
||||
|
||||
if (!ast_strlen_zero(ast_str_buffer(response))) {
|
||||
comp = icalparser_parse_string(ast_str_buffer(response));
|
||||
if (!comp) {
|
||||
ast_debug(3, "iCalendar response data: %s\n", ast_str_buffer(response));
|
||||
ast_log(LOG_WARNING, "Failed to parse iCalendar data: %s\n", icalerror_perror());
|
||||
}
|
||||
}
|
||||
ast_free(response);
|
||||
|
||||
|
Reference in New Issue
Block a user