[asterisk-commits] rmudgett: branch group/CCSS r243035 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 25 16:30:03 CST 2010


Author: rmudgett
Date: Mon Jan 25 16:29:59 2010
New Revision: 243035

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=243035
Log:
Convert remaining CCSS ao2_t_ref() to cc_ref()/cc_unref().

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

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=243035&r1=243034&r2=243035
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Mon Jan 25 16:29:59 2010
@@ -1379,7 +1379,7 @@
 static void dialed_cc_interfaces_destroy(void *data)
 {
 	struct dialed_cc_interfaces *cc_interfaces = data;
-	ao2_t_ref(cc_interfaces->interface_tree, -1, "Unref dial's ref to interface tree");
+	cc_unref(cc_interfaces->interface_tree, "Unref dial's ref to interface tree");
 	ast_free(cc_interfaces->current_extension_dialable_name);
 	ast_free(cc_interfaces);
 }
@@ -1407,7 +1407,7 @@
 	new_cc_interfaces->ignore = old_cc_interfaces->ignore;
 	new_cc_interfaces->dial_parent_id = old_cc_interfaces->dial_parent_id;
 	new_cc_interfaces->is_original_caller = 0;
-	ao2_t_ref(old_cc_interfaces->interface_tree, +1, "New ref due to duplication of interface tree");
+	cc_ref(old_cc_interfaces->interface_tree, "New ref due to duplication of interface tree");
 	new_cc_interfaces->core_id = old_cc_interfaces->core_id;
 	new_cc_interfaces->interface_tree = old_cc_interfaces->interface_tree;
 	return new_cc_interfaces;
@@ -1472,7 +1472,7 @@
 	}
 
 	if (!(tree_item = ast_calloc(1, sizeof(*tree_item)))) {
-		ao2_t_ref(cc_interface, -1, "failed to allocate the tree item, so unref the interface");
+		cc_unref(cc_interface, "failed to allocate the tree item, so unref the interface");
 		return NULL;
 	}
 
@@ -1611,17 +1611,17 @@
 	}
 
 	if (!(cc_interface->config_params = ast_cc_config_params_init())) {
-		ao2_t_ref(cc_interface, -1, "Failed to allocate config params, unref interface");
+		cc_unref(cc_interface, "Failed to allocate config params, unref interface");
 		return NULL;
 	}
 
 	if (!(tree_item = ast_calloc(1, sizeof(*tree_item)))) {
-		ao2_t_ref(cc_interface, -1, "Failed to allocate tree item, unref interface");
+		cc_unref(cc_interface, "Failed to allocate tree item, unref interface");
 		return NULL;
 	}
 
 	if (!(tree_item->dialable_name = ast_strdup(dialable_name))) {
-		ao2_t_ref(cc_interface, -1, "Failed to copy dialable name");
+		cc_unref(cc_interface, "Failed to copy dialable name");
 		cc_tree_item_destroy(tree_item);
 		return NULL;
 	}
@@ -1721,7 +1721,6 @@
 		}
 	}
 	AST_LIST_UNLOCK(cc_interfaces->interface_tree);
-
 
 	if (!(tree_item = cc_device_tree_item_init(device_name, dialable_name, cc_data))) {
 		ast_log(LOG_WARNING, "Unable to create CC device interface for '%s'. CC services will be unavailable on this interface.\n", device_name);




More information about the asterisk-commits mailing list