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:
Naveen Albert
2024-01-23 18:18:51 +00:00
parent f541f8d8c4
commit 8eb6a329d6
+4
View File
@@ -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);