[asterisk-commits] twilson: branch twilson/calendaring r166947 - /team/twilson/calendaring/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 30 18:13:52 CST 2008
Author: twilson
Date: Tue Dec 30 18:13:51 2008
New Revision: 166947
URL: http://svn.digium.com/view/asterisk?view=rev&rev=166947
Log:
Don't forget to unlock on error!
Modified:
team/twilson/calendaring/res/res_caldav.c
team/twilson/calendaring/res/res_exchangecal.c
team/twilson/calendaring/res/res_icalendar.c
Modified: team/twilson/calendaring/res/res_caldav.c
URL: http://svn.digium.com/view/asterisk/team/twilson/calendaring/res/res_caldav.c?view=diff&rev=166947&r1=166946&r2=166947
==============================================================================
--- team/twilson/calendaring/res/res_caldav.c (original)
+++ team/twilson/calendaring/res/res_caldav.c Tue Dec 30 18:13:51 2008
@@ -539,12 +539,14 @@
if (!(pvt->events = ast_calendar_event_container_alloc())) {
ast_log(LOG_ERROR, "Could not allocate space for fetching events for calendar: %s\n", cal->name);
pvt = unref_caldav(pvt);
+ ao2_unlock(cal);
return NULL;
}
if (ast_string_field_init(pvt, 32)) {
ast_log(LOG_ERROR, "Couldn't allocate string field space for calendar: %s\n", cal->name);
pvt = unref_caldav(pvt);
+ ao2_unlock(cal);
return NULL;
}
@@ -561,12 +563,14 @@
if (ast_strlen_zero(pvt->url)) {
ast_log(LOG_WARNING, "No URL was specified for iCalendar '%s' - skipping.\n", cal->name);
pvt = unref_caldav(pvt);
+ ao2_unlock(cal);
return NULL;
}
if (ne_uri_parse(pvt->url, &pvt->uri) || pvt->uri.host == NULL || pvt->uri.path == NULL) {
ast_log(LOG_WARNING, "Could not parse url '%s' for iCalendar '%s' - skipping.\n", pvt->url, cal->name);
pvt = unref_caldav(pvt);
+ ao2_unlock(cal);
return NULL;
}
Modified: team/twilson/calendaring/res/res_exchangecal.c
URL: http://svn.digium.com/view/asterisk/team/twilson/calendaring/res/res_exchangecal.c?view=diff&rev=166947&r1=166946&r2=166947
==============================================================================
--- team/twilson/calendaring/res/res_exchangecal.c (original)
+++ team/twilson/calendaring/res/res_exchangecal.c Tue Dec 30 18:13:51 2008
@@ -616,12 +616,14 @@
if (!(pvt->events = ast_calendar_event_container_alloc())) {
ast_log(LOG_ERROR, "Could not allocate space for fetching events for calendar: %s\n", cal->name);
pvt = unref_exchangecal(pvt);
+ ao2_unlock(cal);
return NULL;
}
if (ast_string_field_init(pvt, 32)) {
ast_log(LOG_ERROR, "Couldn't allocate string field space for calendar: %s\n", cal->name);
pvt = unref_exchangecal(pvt);
+ ao2_unlock(cal);
return NULL;
}
@@ -638,12 +640,14 @@
if (ast_strlen_zero(pvt->url)) {
ast_log(LOG_WARNING, "No URL was specified for iCalendar '%s' - skipping.\n", cal->name);
pvt = unref_exchangecal(pvt);
+ ao2_unlock(cal);
return NULL;
}
if (ne_uri_parse(pvt->url, &pvt->uri) || pvt->uri.host == NULL || pvt->uri.path == NULL) {
ast_log(LOG_WARNING, "Could not parse url '%s' for iCalendar '%s' - skipping.\n", pvt->url, cal->name);
pvt = unref_exchangecal(pvt);
+ ao2_unlock(cal);
return NULL;
}
Modified: team/twilson/calendaring/res/res_icalendar.c
URL: http://svn.digium.com/view/asterisk/team/twilson/calendaring/res/res_icalendar.c?view=diff&rev=166947&r1=166946&r2=166947
==============================================================================
--- team/twilson/calendaring/res/res_icalendar.c (original)
+++ team/twilson/calendaring/res/res_icalendar.c Tue Dec 30 18:13:51 2008
@@ -334,12 +334,14 @@
if (!(pvt->events = ast_calendar_event_container_alloc())) {
ast_log(LOG_ERROR, "Could not allocate space for fetching events for calendar: %s\n", cal->name);
pvt = unref_icalendar(pvt);
+ ao2_unlock(cal);
return NULL;
}
if (ast_string_field_init(pvt, 32)) {
ast_log(LOG_ERROR, "Couldn't allocate string field space for calendar: %s\n", cal->name);
pvt = unref_icalendar(pvt);
+ ao2_unlock(cal);
return NULL;
}
@@ -356,12 +358,14 @@
if (ast_strlen_zero(pvt->url)) {
ast_log(LOG_WARNING, "No URL was specified for iCalendar '%s' - skipping.\n", cal->name);
pvt = unref_icalendar(pvt);
+ ao2_unlock(cal);
return NULL;
}
if (ne_uri_parse(pvt->url, &pvt->uri) || pvt->uri.host == NULL || pvt->uri.path == NULL) {
ast_log(LOG_WARNING, "Could not parse url '%s' for iCalendar '%s' - skipping.\n", pvt->url, cal->name);
pvt = unref_icalendar(pvt);
+ ao2_unlock(cal);
return NULL;
}
More information about the asterisk-commits
mailing list