[asterisk-commits] mmichelson: branch group/CCSS r216640 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 4 16:36:40 CDT 2009


Author: mmichelson
Date: Fri Sep  4 16:36:37 2009
New Revision: 216640

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=216640
Log:
Fix some bugs that caused a crash on startup.


Modified:
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=216640&r1=216639&r2=216640
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Sep  4 16:36:37 2009
@@ -845,6 +845,7 @@
 	strcpy(monitor->name, monitor_name);
 	monitor->callbacks = callbacks;
 	monitor->callbacks->init(monitor, core_id);
+	monitor->monitor_type = callback_type;
 	AST_LIST_HEAD_INIT(&monitor->child_links);
 	AST_LIST_HEAD_INIT(&monitor->parent_links);
 	ast_log(LOG_NOTICE, "Created new monitor named %s of type %s\n", monitor->name, monitor->monitor_type);
@@ -1551,19 +1552,18 @@
 		return -1;
 	}
 	ast_log(LOG_NOTICE, "Successfully created CC sched_thread context\n");
-	/* Root monitor doesn't care about the core id. The root monitor uses
-	 * extension monitor callbacks since the gist of those will be to traverse
-	 * their child links and call each of their children's callbacks
-	 */
-	if (!(root_monitor = cc_monitor_instance_init(AST_CC_ROOT_MONITOR, "extension", "root", -1))) {
-		return -1;
-	}
-	ast_log(LOG_NOTICE, "Successfully created the root CC monitor\n");
-	ao2_ref(root_monitor, -1);
-	ast_log(LOG_NOTICE, "Successfully created root monitor\n");
 	res = ast_register_application2(ccreq_app, ccreq_exec, NULL, NULL, NULL);
 	res |= ast_register_application2(cccancel_app, cccancel_exec, NULL, NULL, NULL);
 	res |= ast_cc_monitor_register(&extension_monitor_cbs);
 	AST_CC_GENERIC_MONITOR_TYPE = generic_monitor_cbs.type;
+	/* Root monitor doesn't care about the core id. The root monitor uses
+	 * extension monitor callbacks since the gist of those will be to traverse
+	 * their child links and call each of their children's callbacks
+	 */
+	if (!(root_monitor = cc_monitor_instance_init(AST_CC_ROOT_MONITOR, "extension", "root", -1))) {
+		return -1;
+	}
+	ast_log(LOG_NOTICE, "Successfully created the root CC monitor\n");
+	ao2_ref(root_monitor, -1);
 	return res;
 }




More information about the asterisk-commits mailing list