[asterisk-commits] mmichelson: branch group/CCSS_Monitor_Restructure r242025 - /team/group/CCSS_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 21 11:08:17 CST 2010


Author: mmichelson
Date: Thu Jan 21 11:08:15 2010
New Revision: 242025

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=242025
Log:
Remove prune_links and its one invocation.


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

Modified: team/group/CCSS_Monitor_Restructure/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS_Monitor_Restructure/main/ccss.c?view=diff&rev=242025&r1=242024&r2=242025
==============================================================================
--- team/group/CCSS_Monitor_Restructure/main/ccss.c (original)
+++ team/group/CCSS_Monitor_Restructure/main/ccss.c Thu Jan 21 11:08:15 2010
@@ -822,53 +822,6 @@
 	link->parent = cc_unref(link->parent, "Unref link's parent");
 	ast_free(link);
 	return;
-}
-
-static void prune_links(struct ast_cc_monitor *monitor, const int core_id, struct ast_cc_monitor_link *link_parent)
-{
-	struct ast_cc_monitor_link *link_iter;
-	ast_log_dynamic_level(cc_logger_level, "Prune links called for monitor %s\n", monitor->interface->name);
-#if 0
-	ao2_callback(cc_monitors, OBJ_NODATA, print_debug, NULL);
-#endif
-	AST_LIST_TRAVERSE_SAFE_BEGIN(&monitor->child_links, link_iter, next_child) {
-		if (link_iter->core_id == core_id) {
-			prune_links(link_iter->child, core_id, link_iter);
-			AST_LIST_REMOVE_CURRENT(next_child);
-			link_iter->child->callbacks->cancel_available_timer(link_iter->child, core_id, &link_iter->child_avail_id);
-			destroy_link(link_iter);
-		}
-	}
-	AST_LIST_TRAVERSE_SAFE_END;
-
-	if (link_parent) {
-		ast_log_dynamic_level(cc_logger_level, "Removing parent link from monitor %s\n", monitor->interface->name);
-		AST_LIST_REMOVE(&monitor->parent_links, link_parent, next_parent);
-	}
-
-	if (monitor->saved_link == link_parent) {
-		monitor->saved_link = NULL;
-	}
-
-	if (monitor->interface->monitor_class == AST_CC_ROOT_MONITOR) {
-		/* Never ever under any circumstances unlink
-		 * the root monitor. Of course, since the root monitor
-		 * is being acted on here, it means that a CC transaction
-		 * failed or has completed. So decrease the number of
-		 * CC requests in the system.
-		 */
-		ast_atomic_fetchadd_int(&cc_request_count, -1);
-		ast_log_dynamic_level(cc_logger_level, "Not unlinking monitor %s because it is the root\n", monitor->interface->name);
-		return;
-	}
-	if (AST_LIST_EMPTY(&monitor->parent_links) &&
-			AST_LIST_EMPTY(&monitor->child_links)) {
-		/* This should cause the monitor's destructor
-		 * callback to be called
-		 */
-		ast_log_dynamic_level(cc_logger_level, "Unlinking monitor %s\n", monitor->interface->name);
-		ao2_t_unlink(cc_monitors, monitor, "Unlink monitor since nothing refers to it anymore");
-	}
 }
 
 /*!
@@ -2292,12 +2245,6 @@
 {
 	struct cc_core_instance *core_instance = data;
 	ast_log_dynamic_level(cc_logger_level, "Destroying core instance %d\n", core_instance->core_id);
-	if (core_instance->monitor) {
-		prune_links(core_instance->monitor, core_instance->core_id, NULL);
-	} else if (core_instance->agent) {
-		kill_interface_tree_monitors(core_instance->agent->interface_tree,
-			core_instance->core_id);
-	}
 	if (core_instance->agent) {
 		cc_unref(core_instance->agent, "Core instance is done with the agent now");
 	}




More information about the asterisk-commits mailing list