mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +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
(cherry picked from commit 8eb6a329d6
)
This commit is contained in:
committed by
Asterisk Development Team
parent
61c78fc48b
commit
309ec5e762
@@ -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