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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 1 17:28:09 CDT 2009


Author: mmichelson
Date: Tue Sep  1 17:28:05 2009
New Revision: 215260

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215260
Log:
Skeleton for function to translate from interface tree to monitor graph.


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=215260&r1=215259&r2=215260
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Tue Sep  1 17:28:05 2009
@@ -803,6 +803,31 @@
 	return monitor;
 }
 
+static void interface_tree_to_monitor(struct core_pending_cc_offer *pending_offer, struct cc_core_instance *core_instance)
+{
+	/* Oh boy
+	 *
+	 * Steps
+	 *
+	 * 1. Give the core_instance a reference to the root monitor.
+	 *
+	 * 2. Loop through the pending_offer's interface tree.
+	 * 
+	 * 3. For each interface encountered, see if there is
+	 * already a monitor for that interface set up.
+	 *
+	 * 		3a. If there is, create a new link from whatever
+	 * 		the appropriate parent is to the pre-existing monitor
+	 *
+	 * 		3b. If not, then create the new monitor, create a
+	 * 		link from the appropriate parent to a newly created
+	 * 		monitor.
+	 *
+	 * 4. unref the pending_offer's ref to the interface tree. This
+	 * SHOULD cause the interface_tree's destructor to be called.
+	 */
+}
+
 static int cc_monitor_tree_init(const int core_id)
 {
 	/* Oh boy
@@ -844,6 +869,8 @@
 	}
 
 	ast_assert(core_instance->monitor == NULL);
+
+	interface_tree_to_monitor(pending_offer, core_instance);
 
 	ao2_ref(core_instance, -1);
 	ao2_ref(pending_offer, -1);




More information about the asterisk-commits mailing list