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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Oct 18 16:00:26 CDT 2009


Author: mmichelson
Date: Sun Oct 18 16:00:22 2009
New Revision: 224440

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=224440
Log:
Make some public functions private.


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

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=224440&r1=224439&r2=224440
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Sun Oct 18 16:00:22 2009
@@ -548,27 +548,6 @@
  */
 AST_LIST_HEAD(ast_cc_interface_tree, ast_cc_tree_item);
 
-/*!
- * \brief Destructor function for an ast_cc_interface tree
- *
- * \param data The ast_cc_interface_tree whose refcount has reached 0
- */
-void ast_cc_interface_tree_destroy(void *cc_interface_tree);
-
-/*!
- * \brief destructor callback for ast_cc_interface
- *
- * \param data The ast_cc_interface to be destroyed
- */
-void ast_cc_interface_destroy(void *data);
-
-/*!
- * \brief free the components of an ast_cc_tree_item
- *
- * \param tree_item The ast_cc_tree_item to destroy
- */
-void ast_cc_tree_item_destroy(struct ast_cc_tree_item *tree_item);
-
 /* END TREE STRUCTURES AND API FOR APP_DIAL'S USE */
 
 /*!

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=224440&r1=224439&r2=224440
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Sun Oct 18 16:00:22 2009
@@ -1264,26 +1264,26 @@
 }
 #endif
 
-void ast_cc_interface_destroy(void *data)
+static void cc_interface_destroy(void *data)
 {
 	struct ast_cc_interface *interface = data;
 	ast_log(LOG_NOTICE, "Destroying cc interface %s\n", interface->name);
 	ast_cc_config_params_destroy(interface->config_params);
 }
 
-void ast_cc_tree_item_destroy(struct ast_cc_tree_item *tree_item)
+static void cc_tree_item_destroy(struct ast_cc_tree_item *tree_item)
 {
 	cc_unref(tree_item->interface, "Unreffing tree's reference to interface");
 	ast_free(tree_item->dialable_name);
 	ast_free(tree_item);
 }
 
-void ast_cc_interface_tree_destroy(void *data)
+static void cc_interface_tree_destroy(void *data)
 {
 	struct ast_cc_interface_tree *cc_interface_tree = data;
 	struct ast_cc_tree_item *tree_item;
 	while ((tree_item = AST_LIST_REMOVE_HEAD(cc_interface_tree, next))) {
-		ast_cc_tree_item_destroy(tree_item);
+		cc_tree_item_destroy(tree_item);
 	}
 }
 
@@ -1472,7 +1472,7 @@
 
 	ast_str_set(&str, 0, "%s@%s", exten, context);
 
-	if (!(cc_interface = ao2_alloc(sizeof(*cc_interface) + ast_str_strlen(str), ast_cc_interface_destroy))) {
+	if (!(cc_interface = ao2_alloc(sizeof(*cc_interface) + ast_str_strlen(str), cc_interface_destroy))) {
 		return NULL;
 	}
 
@@ -1532,15 +1532,15 @@
 	}
 
 	if (!(dial_cc_datastore = ast_datastore_alloc(&dialed_cc_interfaces_info, NULL))) {
-		ast_cc_tree_item_destroy(tree_item);
+		cc_tree_item_destroy(tree_item);
 		ast_free(interfaces);
 		return -1;
 	}
 
-	if (!(interfaces->interface_tree = ao2_t_alloc(sizeof(*interfaces->interface_tree), ast_cc_interface_tree_destroy,
+	if (!(interfaces->interface_tree = ao2_t_alloc(sizeof(*interfaces->interface_tree), cc_interface_tree_destroy,
 					"Allocate interface tree"))) {
 		ast_datastore_free(dial_cc_datastore);
-		ast_cc_tree_item_destroy(tree_item);
+		cc_tree_item_destroy(tree_item);
 		ast_free(interfaces);
 		return -1;
 	}
@@ -1587,7 +1587,7 @@
 	struct ast_cc_tree_item *tree_item;
 	size_t name_len = strlen(name);
 
-	if (!(cc_interface = ao2_alloc(sizeof(*cc_interface) + name_len, ast_cc_interface_destroy))) {
+	if (!(cc_interface = ao2_alloc(sizeof(*cc_interface) + name_len, cc_interface_destroy))) {
 		return NULL;
 	}
 
@@ -2571,7 +2571,7 @@
 
 static struct ast_cc_interface *root_interface_init(void)
 {
-	struct ast_cc_interface *cc_interface = ao2_alloc(sizeof(*cc_interface) + strlen("root"), ast_cc_interface_destroy);
+	struct ast_cc_interface *cc_interface = ao2_alloc(sizeof(*cc_interface) + strlen("root"), cc_interface_destroy);
 
 	strcpy(cc_interface->name, "root");
 	cc_interface->monitor_class = AST_CC_ROOT_MONITOR;




More information about the asterisk-commits mailing list