[asterisk-commits] mmichelson: branch group/CCSS r213880 - in /team/group/CCSS: apps/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 24 15:42:43 CDT 2009


Author: mmichelson
Date: Mon Aug 24 15:42:40 2009
New Revision: 213880

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=213880
Log:
Remove silly comments, add more debugging messages, Fix logic errors.


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

Modified: team/group/CCSS/apps/app_dial.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/apps/app_dial.c?view=diff&rev=213880&r1=213879&r2=213880
==============================================================================
--- team/group/CCSS/apps/app_dial.c (original)
+++ team/group/CCSS/apps/app_dial.c Mon Aug 24 15:42:40 2009
@@ -1130,15 +1130,7 @@
 					break;
 				case AST_CONTROL_CC:
 					if (!ignore_cc) {
-						handle_cc_control_frame(in, f->data.ptr);
-						/* Oh snap! We need to create a new ast_cc_interface
-						 * and add it to the datastore on chan. This one will
-						 * be a "device" type, so it will have stats like:
-						 * - name: Tech/device
-						 * - id: atomic add of the dial_cc_interface_counter
-						 * - parent_id: chan's datastore's dial_parent_id
-static struct ast_cc_interface *cc_extension_interface_init(const char * const exten, const char * const context, const unsigned int parent_id)
-						 */
+						handle_cc_control_frame(c, f->data.ptr);
 					}
 					break;
 				case -1:
@@ -1853,7 +1845,7 @@
 	ast_channel_unlock(chan);
 
 	interfaces = cc_interfaces_datastore->data;
-	if (!interfaces->done) {
+	if (interfaces->done) {
 		/* Situation 3 has occurred */
 		*ignore_cc = 1;
 		return 0;
@@ -1864,6 +1856,9 @@
 			S_OR(chan->macrocontext, chan->context), interfaces->dial_parent_id))) {
 		return -1;
 	}
+	AST_LIST_LOCK(interfaces->interface_tree);
+	AST_LIST_INSERT_TAIL(interfaces->interface_tree, cc_interface, next);
+	AST_LIST_UNLOCK(interfaces->interface_tree);
 	interfaces->dial_parent_id = cc_interface->id;
 	return 0;
 }

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=213880&r1=213879&r2=213880
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Mon Aug 24 15:42:40 2009
@@ -364,6 +364,7 @@
 	struct ast_cc_interface_tree *cc_interface_tree = data;
 	struct ast_cc_interface *cc_interface;
 	while ((cc_interface = AST_LIST_REMOVE_HEAD(cc_interface_tree, next))) {
+		ast_log(LOG_NOTICE, "Gonna free interface named '%s' with id %d\n", cc_interface->name, cc_interface->id);
 		ast_free(cc_interface);
 	}
 }




More information about the asterisk-commits mailing list