[asterisk-commits] mmichelson: branch group/CCSS r247838 - /team/group/CCSS/main/ccss.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 18 16:39:09 CST 2010
Author: mmichelson
Date: Thu Feb 18 16:39:06 2010
New Revision: 247838
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247838
Log:
A few search and replaces.
s/ast_cc_interface_tree/cc_monitor_tree/
s/interface_tree/monitor_tree/
s/interface tree/monitor tree/
s/tree item/monitor/
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=247838&r1=247837&r2=247838
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Feb 18 16:39:06 2010
@@ -163,7 +163,7 @@
* to use it, and it may last beyond the lifetime of a single
* thread.
*/
-AST_LIST_HEAD(ast_cc_interface_tree, ast_cc_monitor);
+AST_LIST_HEAD(cc_monitor_tree, ast_cc_monitor);
/*!
* \internal
@@ -197,7 +197,7 @@
* \retval non-NULL A reference to the newly created cc_core_instance
*/
static struct cc_core_instance *cc_core_init_instance(struct ast_channel *caller_chan,
- struct ast_cc_interface_tree *called_tree, const int core_id, struct ast_control_cc_payload *cc_data);
+ struct cc_monitor_tree *called_tree, const int core_id, struct ast_control_cc_payload *cc_data);
static const char *CC_LOGGER_LEVEL_NAME = "CC";
static int cc_logger_level;
@@ -258,7 +258,7 @@
* This pointer's nullity is a way of testing
* whether CC has been requested yet.
*/
- struct ast_cc_interface_tree *monitors;
+ struct cc_monitor_tree *monitors;
};
static int cc_core_instance_hash_fn(const void *obj, const int flags)
@@ -1366,7 +1366,7 @@
static void cc_interface_tree_destroy(void *data)
{
- struct ast_cc_interface_tree *cc_interface_tree = data;
+ struct cc_monitor_tree *cc_interface_tree = data;
struct ast_cc_monitor *monitor;
while ((monitor = AST_LIST_REMOVE_HEAD(cc_interface_tree, next))) {
if (monitor->callbacks) {
@@ -1435,14 +1435,14 @@
/*!
* When nested dials occur (i.e. dialing local channels), the invocation
* of the Local channel may have modifiers like /n or /b on the channel name.
- * This needs to be preserved as the dialable name on an extension tree item
+ * This needs to be preserved as the dialable name on an extension monitor
* which may be created for the local channel.
*/
char *current_extension_dialstring;
/*!
* Reference-counted "tree" of interfaces.
*/
- struct ast_cc_interface_tree *interface_tree;
+ struct cc_monitor_tree *interface_tree;
};
/*!
@@ -1450,9 +1450,9 @@
* \brief Destructor function for cc_interfaces datastore
*
* This function will free the actual datastore and drop
- * the refcount for the interface tree by one. In cases
+ * the refcount for the monitor tree by one. In cases
* where CC can actually be used, this unref will not
- * result in the destruction of the interface tree, because
+ * result in the destruction of the monitor tree, because
* the CC core will still have a reference.
*
* \param data The dialed_cc_interfaces struct to destroy
@@ -1460,7 +1460,7 @@
static void dialed_cc_interfaces_destroy(void *data)
{
struct dialed_cc_interfaces *cc_interfaces = data;
- cc_unref(cc_interfaces->interface_tree, "Unref dial's ref to interface tree");
+ cc_unref(cc_interfaces->interface_tree, "Unref dial's ref to monitor tree");
ast_free(cc_interfaces->current_extension_dialstring);
ast_free(cc_interfaces);
}
@@ -1469,7 +1469,7 @@
* \internal
* \brief Duplicate callback for cc_interfaces datastore
*
- * Integers are copied by value, but the interface tree
+ * Integers are copied by value, but the monitor tree
* is done via a shallow copy and a bump of the refcount.
* This way, sub-Dials will be appending interfaces onto
* the same list as this call to Dial.
@@ -1488,7 +1488,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;
- cc_ref(old_cc_interfaces->interface_tree, "New ref due to duplication of interface tree");
+ cc_ref(old_cc_interfaces->interface_tree, "New ref due to duplication of monitor 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;
@@ -1543,7 +1543,7 @@
struct ast_cc_monitor *monitor;
struct extension_monitor_pvt *extension_pvt;
struct extension_child_dialstring *child_dialstring;
- struct ast_cc_interface_tree *interface_tree;
+ struct cc_monitor_tree *interface_tree;
int id;
ast_channel_lock(incoming);
@@ -1566,14 +1566,14 @@
if (!monitor) {
AST_LIST_UNLOCK(interface_tree);
- cc_unref(interface_tree, "Done with interface tree");
+ cc_unref(interface_tree, "Done with monitor tree");
return;
}
extension_pvt = monitor->private_data;
if (!(child_dialstring = ast_calloc(1, sizeof(*child_dialstring)))) {
AST_LIST_UNLOCK(interface_tree);
- cc_unref(interface_tree, "Done with interface tree");
+ cc_unref(interface_tree, "Done with monitor tree");
return;
}
ast_copy_string(child_dialstring->original_dialstring, dialstring, sizeof(child_dialstring->original_dialstring));
@@ -1581,7 +1581,7 @@
child_dialstring->is_valid = 1;
AST_LIST_INSERT_TAIL(&extension_pvt->child_dialstrings, child_dialstring, next);
AST_LIST_UNLOCK(interface_tree);
- cc_unref(interface_tree, "Done with interface tree");
+ cc_unref(interface_tree, "Done with monitor tree");
}
static void cc_extension_monitor_change_is_valid(struct cc_core_instance *core_instance, unsigned int parent_id, const char * const device_name, int is_valid)
@@ -1636,7 +1636,7 @@
}
if (!(monitor = ao2_alloc(sizeof(*monitor), cc_monitor_destroy))) {
- cc_unref(cc_interface, "failed to allocate the tree item, so unref the interface");
+ cc_unref(cc_interface, "failed to allocate the monitor, so unref the interface");
return NULL;
}
@@ -1703,9 +1703,9 @@
}
if (!(interfaces->interface_tree = ao2_t_alloc(sizeof(*interfaces->interface_tree), cc_interface_tree_destroy,
- "Allocate interface tree"))) {
+ "Allocate monitor tree"))) {
ast_datastore_free(dial_cc_datastore);
- cc_unref(monitor, "Could not allocate interface tree on dialed interfaces datastore. Unreffing monitor");
+ cc_unref(monitor, "Could not allocate monitor tree on dialed interfaces datastore. Unreffing monitor");
ast_free(interfaces);
return -1;
}
@@ -1804,7 +1804,7 @@
}
if (!(monitor = ao2_alloc(sizeof(*monitor), cc_monitor_destroy))) {
- cc_unref(cc_interface, "Failed to allocate tree item, unref interface");
+ cc_unref(cc_interface, "Failed to allocate monitor, unref interface");
call_destructor_with_no_monitor(cc_data->monitor_type, cc_data->private_data);
return NULL;
}
@@ -1847,7 +1847,7 @@
* This function will call cc_device_monitor_init to
* create the new cc_monitor for the device from which
* we read the frame. In addition, the new device will be added
- * to the interface tree on the dialed_cc_interfaces datastore
+ * to the monitor tree on the dialed_cc_interfaces datastore
* on the inbound channel.
*
* If this is the first AST_CONTROL_CC frame that we have handled
@@ -1911,7 +1911,7 @@
/* Yeah this kind of sucks, but luckily most people
* aren't dialing thousands of interfaces on every call
*
- * This traversal helps us to not create duplicate tree items in
+ * This traversal helps us to not create duplicate monitors in
* case a device queues multiple CC control frames.
*/
AST_LIST_LOCK(cc_interfaces->interface_tree);
@@ -1934,7 +1934,7 @@
}
AST_LIST_LOCK(cc_interfaces->interface_tree);
- cc_ref(monitor, "Interface tree's reference to the monitor");
+ cc_ref(monitor, "monitor tree's reference to the monitor");
AST_LIST_INSERT_TAIL(cc_interfaces->interface_tree, monitor, next);
AST_LIST_UNLOCK(cc_interfaces->interface_tree);
@@ -2019,7 +2019,7 @@
*/
monitor->dialstring = ast_strdup(interfaces->current_extension_dialstring);
AST_LIST_LOCK(interfaces->interface_tree);
- cc_ref(monitor, "Interface tree's reference to the monitor");
+ cc_ref(monitor, "monitor tree's reference to the monitor");
AST_LIST_INSERT_TAIL(interfaces->interface_tree, monitor, next);
AST_LIST_UNLOCK(interfaces->interface_tree);
interfaces->dial_parent_id = monitor->id;
@@ -2090,7 +2090,7 @@
static struct ast_cc_agent *cc_agent_init(struct ast_channel *caller_chan,
const char * const caller_name, const int core_id,
- struct ast_cc_interface_tree *interface_tree)
+ struct cc_monitor_tree *interface_tree)
{
struct ast_cc_agent *agent;
struct ast_cc_config_params *cc_params;
@@ -2421,7 +2421,7 @@
}
static struct cc_core_instance *cc_core_init_instance(struct ast_channel *caller_chan,
- struct ast_cc_interface_tree *called_tree, const int core_id, struct ast_control_cc_payload *cc_data)
+ struct cc_monitor_tree *called_tree, const int core_id, struct ast_control_cc_payload *cc_data)
{
char caller[AST_CHANNEL_NAME];
struct cc_core_instance *core_instance;
@@ -2472,7 +2472,7 @@
return NULL;
}
- core_instance->monitors = cc_ref(called_tree, "Core instance getting ref to interface tree");
+ core_instance->monitors = cc_ref(called_tree, "Core instance getting ref to monitor tree");
ao2_t_link(cc_core_instances, core_instance, "Link core instance into container");
@@ -2865,7 +2865,7 @@
int core_id;
char ignore;
char nested;
- struct ast_cc_interface_tree *interface_tree;
+ struct cc_monitor_tree *interface_tree;
};
static void *cc_recall_ds_duplicate(void *data)
@@ -2876,7 +2876,7 @@
if (!new_data) {
return NULL;
}
- new_data->interface_tree = cc_ref(old_data->interface_tree, "Bump refcount of interface tree for recall datastore duplicate");
+ new_data->interface_tree = cc_ref(old_data->interface_tree, "Bump refcount of monitor tree for recall datastore duplicate");
new_data->core_id = old_data->core_id;
new_data->nested = 1;
return new_data;
@@ -2885,7 +2885,7 @@
static void cc_recall_ds_destroy(void *data)
{
struct cc_recall_ds_data *recall_data = data;
- recall_data->interface_tree = cc_unref(recall_data->interface_tree, "Unref recall interface tree");
+ recall_data->interface_tree = cc_unref(recall_data->interface_tree, "Unref recall monitor tree");
ast_free(recall_data);
}
@@ -2917,7 +2917,7 @@
}
recall_data->interface_tree = cc_ref(core_instance->monitors,
- "Bump refcount for interface tree for recall datastore");
+ "Bump refcount for monitor tree for recall datastore");
recall_data->core_id = core_id;
recall_datastore->data = recall_data;
recall_datastore->inheritance = DATASTORE_INHERIT_FOREVER;
@@ -2932,7 +2932,7 @@
{
struct ast_datastore *recall_datastore;
struct cc_recall_ds_data *recall_data;
- struct ast_cc_interface_tree *interface_tree;
+ struct cc_monitor_tree *interface_tree;
char device_name[AST_CHANNEL_NAME];
struct ast_cc_monitor *device_monitor;
int core_id_candidate;
@@ -2963,7 +2963,7 @@
/* If the nested flag is not set, then this means that
* the channel passed to this function is the caller making
* the recall. This means that we shouldn't look through
- * the interface tree for the channel because it shouldn't be
+ * the monitor tree for the channel because it shouldn't be
* there. However, this is a recall though, so return true.
*/
*core_id = recall_data->core_id;
@@ -2986,7 +2986,7 @@
/* We grab the value of the recall_data->core_id so that we
* can unlock the channel before we start looking through the
* interface list. That way we don't have to worry about a possible
- * clash between the channel lock and the interface tree lock.
+ * clash between the channel lock and the monitor tree lock.
*/
core_id_candidate = recall_data->core_id;
ast_channel_unlock(chan);
@@ -3080,7 +3080,7 @@
int ast_cc_agent_set_interfaces_chanvar(struct ast_channel *chan)
{
struct ast_datastore *recall_datastore;
- struct ast_cc_interface_tree *interface_tree;
+ struct cc_monitor_tree *interface_tree;
struct ast_cc_monitor *monitor;
struct cc_recall_ds_data *recall_data;
struct ast_str *str = ast_str_create(64);
@@ -3096,7 +3096,7 @@
return -1;
}
recall_data = recall_datastore->data;
- interface_tree = cc_ref(recall_data->interface_tree, "Getting ref of recall interface tree");
+ interface_tree = cc_ref(recall_data->interface_tree, "Getting ref of recall monitor tree");
ast_channel_unlock(chan);
AST_LIST_LOCK(interface_tree);
@@ -3107,7 +3107,7 @@
pbx_builtin_setvar_helper(chan, "CC_INTERFACES", ast_str_buffer(str));
ast_log_dynamic_level(cc_logger_level, "CC_INTERFACES set to %s\n", ast_str_buffer(str));
- cc_unref(interface_tree, "Done with interface tree while setting CC_INTERFACES");
+ cc_unref(interface_tree, "Done with monitor tree while setting CC_INTERFACES");
ast_free(str);
return 0;
}
@@ -3115,7 +3115,7 @@
int ast_set_cc_interfaces_chanvar(struct ast_channel *chan, const char * const extension)
{
struct ast_datastore *recall_datastore;
- struct ast_cc_interface_tree *interface_tree;
+ struct cc_monitor_tree *interface_tree;
struct ast_cc_monitor *monitor_iter;
struct cc_recall_ds_data *recall_data;
struct ast_str *str = ast_str_create(64);
@@ -3131,7 +3131,7 @@
return -1;
}
recall_data = recall_datastore->data;
- interface_tree = cc_ref(recall_data->interface_tree, "Get reference to recall data interface tree");
+ interface_tree = cc_ref(recall_data->interface_tree, "Get reference to recall data monitor tree");
ast_channel_unlock(chan);
AST_LIST_LOCK(interface_tree);
More information about the asterisk-commits
mailing list