[asterisk-commits] mmichelson: branch group/CCSS r238587 - /team/group/CCSS/main/ccss.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 8 11:32:05 CST 2010
Author: mmichelson
Date: Fri Jan 8 11:32:01 2010
New Revision: 238587
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=238587
Log:
Don't ignore return of monitor init callback.
Modified:
team/group/CCSS/main/ccss.c
Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=238587&r1=238586&r2=238587
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Jan 8 11:32:01 2010
@@ -2224,7 +2224,11 @@
monitor->interface = cc_ref(cc_interface, "monitor gains reference to interface");
monitor->callbacks = callbacks;
- monitor->callbacks->init(monitor, core_id);
+ if (monitor->callbacks->init(monitor, core_id)) {
+ ast_log_dynamic_level(cc_logger_level, "Init monitor callback failed for monitor %s\n", callbacks->type);
+ cc_unref(monitor, "Monitor init callback failed");
+ return NULL;
+ }
AST_LIST_HEAD_INIT(&monitor->child_links);
AST_LIST_HEAD_INIT(&monitor->parent_links);
ast_log_dynamic_level(cc_logger_level, "Created new monitor named %s of type %s\n", monitor->interface->name, monitor->interface->monitor_type);
More information about the asterisk-commits
mailing list