[asterisk-commits] mmichelson: branch group/CCSS r215065 - in /team/group/CCSS: include/asterisk...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 31 16:21:42 CDT 2009


Author: mmichelson
Date: Mon Aug 31 16:21:38 2009
New Revision: 215065

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215065
Log:
Remove an obsolete comment from ccss.h and add stub
for monitor creation function in ccss.c

I think I'll go back to writing the cancellation
dialplan function now.


Modified:
    team/group/CCSS/include/asterisk/ccss.h
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=215065&r1=215064&r2=215065
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Mon Aug 31 16:21:38 2009
@@ -672,11 +672,7 @@
  *
  * This function currently will add the called tree to a container
  * of pending CC offers, so that they may be saved for future use.
- *
- * TODO: This function also needs to allocate the agent structure
- * for the caller's side and start the core state machine in the 
- * CC_AVAILABLE state.
- *
+  *
  * \param caller The caller's channel
  * \param called_tree A tree indicating the interfaces dialed during 
  * this call, as well as which type of call completion service should 

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=215065&r1=215064&r2=215065
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Mon Aug 31 16:21:38 2009
@@ -759,6 +759,37 @@
 	}
 
 	ast_free(agent_pvt);
+}
+
+static int cc_monitor_init(const int core_id)
+{
+	/* Oh boy
+	 *
+	 * So, this is where we set up the monitor
+	 * for the CC request we just received. Let's
+	 * do our usual thing and break it into steps,
+	 * shall we? Okay.
+	 *
+	 * 1. Use the core_id to find the core instance
+	 * and pending offer.
+	 *
+	 * 2. Get a reference to the root monitor. This
+	 * may entail creating the root monitor.
+	 *
+	 * 3. Morph the pending offer into a monitor
+	 * tree. For each item in the pending offer's
+	 * interface tree, a new monitor link MUST
+	 * be created. However, a new monitor struct
+	 * will not necessarily.
+	 *
+	 * 4. Call each device monitor's request_cc
+	 * callback.
+	 *
+	 * 5. Profit
+	 */
+
+	/* STUB */
+	return 0;
 }
 
 struct cc_state_change_args {
@@ -806,6 +837,7 @@
 				(core_instance->current_state == CC_AVAILABLE && !strcmp(core_instance->agent->callbacks->type, "generic")))) {
 			ast_log(LOG_NOTICE, "Invalid state change request. Cannot go from %d to %d\n", core_instance->current_state, args->state);
 		}
+		cc_monitor_init(args->core_id);
 		break;
 	case CC_ACTIVE:
 		/* Either




More information about the asterisk-commits mailing list