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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 1 13:46:43 CDT 2009


Author: mmichelson
Date: Thu Oct  1 13:46:40 2009
New Revision: 221690

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=221690
Log:
s/dial_cc_interfaces/dialed_cc_interfaces/


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=221690&r1=221689&r2=221690
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Oct  1 13:46:40 2009
@@ -481,7 +481,7 @@
  * This counter is used for assigning unique ids
  * to CC-enabled dialed interfaces.
  */
-static int dial_cc_interface_counter;
+static int dialed_cc_interface_counter;
 
 /*!
  * \brief data stored in CC datastore
@@ -491,10 +491,10 @@
  * to the intrinsic data of the tree, some extra information
  * is needed for use by app_dial.
  */
-struct dial_cc_interfaces {
+struct dialed_cc_interfaces {
 	/*!
 	 * This value serves a dual-purpose. When dial starts, if the
-	 * dial_cc_interfaces datastore currently exists on the calling
+	 * dialed_cc_interfaces datastore currently exists on the calling
 	 * channel, then the dial_parent_id will serve as a means of
 	 * letting the new extension ast_cc_tree_item we create know
 	 * who his parent is. This value will be the extension
@@ -542,11 +542,11 @@
  * result in the destruction of the interface tree, because
  * the CC core will still have a reference.
  *
- * \param data The dial_cc_interfaces struct to destroy
+ * \param data The dialed_cc_interfaces struct to destroy
  */
-static void dial_cc_interfaces_destroy(void *data)
-{
-	struct dial_cc_interfaces *cc_interfaces = data;
+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");
 	ast_free(cc_interfaces);
 }
@@ -559,14 +559,14 @@
  * This way, sub-Dials will be appending interfaces onto
  * the same list as this call to Dial.
  *
- * \param data The old dial_cc_interfaces we want to copy
- * \retval NULL Could not allocate memory for new dial_cc_interfaces
- * \retval non-NULL The new copy of the dial_cc_interfaces
+ * \param data The old dialed_cc_interfaces we want to copy
+ * \retval NULL Could not allocate memory for new dialed_cc_interfaces
+ * \retval non-NULL The new copy of the dialed_cc_interfaces
  */
-static void *dial_cc_interfaces_duplicate(void *data)
-{
-	struct dial_cc_interfaces *old_cc_interfaces = data;
-	struct dial_cc_interfaces *new_cc_interfaces = ast_calloc(1, sizeof(*new_cc_interfaces));
+static void *dialed_cc_interfaces_duplicate(void *data)
+{
+	struct dialed_cc_interfaces *old_cc_interfaces = data;
+	struct dialed_cc_interfaces *new_cc_interfaces = ast_calloc(1, sizeof(*new_cc_interfaces));
 	if (!new_cc_interfaces) {
 		return NULL;
 	}
@@ -579,21 +579,21 @@
 }
 
 /*!
- * \brief information regarding the dial_cc_interfaces datastore
- *
- * The dial_cc_interfaces datastore is responsible for keeping track
+ * \brief information regarding the dialed_cc_interfaces datastore
+ *
+ * The dialed_cc_interfaces datastore is responsible for keeping track
  * of what CC-enabled interfaces have been dialed by the caller. For
  * more information regarding the actual structure of the tree, see
  * the documentation provided in include/asterisk/ccss.h
  */
-static const struct ast_datastore_info dial_cc_interfaces_info = {
+static const struct ast_datastore_info dialed_cc_interfaces_info = {
 	.type = "Dial CC Interfaces",
-	.duplicate = dial_cc_interfaces_duplicate,
-	.destroy = dial_cc_interfaces_destroy,
+	.duplicate = dialed_cc_interfaces_duplicate,
+	.destroy = dialed_cc_interfaces_destroy,
 };
 
 /*!
- * \brief Routine to set the done flag on the dial_cc_interfaces datastore
+ * \brief Routine to set the done flag on the dialed_cc_interfaces datastore
  *
  * When we determine that further calls to Dial in a particular thread should
  * not pay attention to any new CC offers, we set this flag as an indicator.
@@ -604,10 +604,10 @@
 void ast_ignore_cc(struct ast_channel *chan)
 {
 	struct ast_datastore *cc_datastore;
-	struct dial_cc_interfaces *cc_interfaces;
+	struct dialed_cc_interfaces *cc_interfaces;
 
 	ast_channel_lock(chan);
-	if ((cc_datastore = ast_channel_datastore_find(chan, &dial_cc_interfaces_info, NULL))) {
+	if ((cc_datastore = ast_channel_datastore_find(chan, &dialed_cc_interfaces_info, NULL))) {
 		cc_interfaces = cc_datastore->data;
 		cc_interfaces->done = 1;
 	}
@@ -655,7 +655,7 @@
 }
 
 /*!
- * \brief allocate dial_cc_interfaces datastore and initialize fields
+ * \brief allocate dialed_cc_interfaces datastore and initialize fields
  *
  * This function is called when Situation 1 occurs in create_root_tree_item.
  * See that function for more information on what Situation 1 is.
@@ -670,7 +670,7 @@
  * \retval 0 Success
  */
 static int cc_interfaces_datastore_init(struct ast_channel *chan) {
-	struct dial_cc_interfaces *interfaces;
+	struct dialed_cc_interfaces *interfaces;
 	struct ast_cc_tree_item *tree_item;
 	struct ast_datastore *dial_cc_datastore;
 
@@ -683,7 +683,7 @@
 		return -1;
 	}
 
-	if (!(dial_cc_datastore = ast_datastore_alloc(&dial_cc_interfaces_info, NULL))) {
+	if (!(dial_cc_datastore = ast_datastore_alloc(&dialed_cc_interfaces_info, NULL))) {
 		ast_cc_tree_item_destroy(tree_item);
 		ast_free(interfaces);
 		return -1;
@@ -775,7 +775,7 @@
  * This function will call cc_device_tree_item_init to
  * create the new ast_cc_tree_item for the device from which
  * we read the frame. In addition, the new device will be added
- * to the interface tree on the dial_cc_interfaces datastore
+ * to the interface tree on the dialed_cc_interfaces datastore
  * on the inbound channel.
  *
  * If this is the first AST_CONTROL_CC frame that we have handled
@@ -793,7 +793,7 @@
 	char *dash;
 	struct ast_cc_tree_item *tree_item;
 	struct ast_datastore *cc_datastore;
-	struct dial_cc_interfaces *cc_interfaces;
+	struct dialed_cc_interfaces *cc_interfaces;
 	struct ast_control_cc_payload *cc_data = frame_data;
 
 	ast_copy_string(device_name, outbound->name, sizeof(device_name));
@@ -801,7 +801,7 @@
 		*dash = '\0';
 	}
 
-	if (!(cc_datastore = ast_channel_datastore_find(inbound, &dial_cc_interfaces_info, NULL))) {
+	if (!(cc_datastore = ast_channel_datastore_find(inbound, &dialed_cc_interfaces_info, NULL))) {
 		ast_log(LOG_WARNING, "Unable to retrieve CC datastore while processing CC frame from '%s'. CC services will be unavailable.\n", device_name);
 		return;
 	}
@@ -838,11 +838,11 @@
 int ast_cc_create_new_core(struct ast_channel *inbound)
 {
 	struct ast_datastore *cc_datastore;
-	struct dial_cc_interfaces *cc_interfaces;
+	struct dialed_cc_interfaces *cc_interfaces;
 	int is_tree_empty;
 
 	ast_channel_lock(inbound);
-	if (!(cc_datastore = ast_channel_datastore_find(inbound, &dial_cc_interfaces_info, NULL))) {
+	if (!(cc_datastore = ast_channel_datastore_find(inbound, &dialed_cc_interfaces_info, NULL))) {
 		ast_channel_unlock(inbound);
 		return -1;
 	}
@@ -876,7 +876,7 @@
  * ball rolling as far as CC is concerned. See the in-line comments about the
  * three situations that can occur for more details.
  *
- * \param chan The channel on which the dial_cc_interfaces datastore is on or needs
+ * \param chan The channel on which the dialed_cc_interfaces datastore is on or needs
  * to be created on
  * \param[out] ignore_cc If the datastore is already on the channel and the done flag
  * is set, then we will set this so that new CC offers will be ignored
@@ -906,7 +906,7 @@
 	 */
 
 	struct ast_datastore *cc_interfaces_datastore;
-	struct dial_cc_interfaces *interfaces;
+	struct dialed_cc_interfaces *interfaces;
 	struct ast_cc_tree_item *tree_item;
 	ast_channel_lock(chan);
 
@@ -918,7 +918,7 @@
 		return 0;
 	}
 
-	if (!(cc_interfaces_datastore = ast_channel_datastore_find(chan, &dial_cc_interfaces_info, NULL))) {
+	if (!(cc_interfaces_datastore = ast_channel_datastore_find(chan, &dialed_cc_interfaces_info, NULL))) {
 		/* Situation 1 has occurred */
 		ast_channel_unlock(chan);
 		return cc_interfaces_datastore_init(chan);




More information about the asterisk-commits mailing list