[asterisk-commits] mmichelson: branch group/CCSS_Monitor_Restructure r242359 - in /team/group/CC...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 22 10:59:13 CST 2010
Author: mmichelson
Date: Fri Jan 22 10:59:09 2010
New Revision: 242359
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=242359
Log:
Strip the "2" off the monitor callback names.
Modified:
team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h
team/group/CCSS_Monitor_Restructure/main/ccss.c
Modified: team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h?view=diff&rev=242359&r1=242358&r2=242359
==============================================================================
--- team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h (original)
+++ team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h Fri Jan 22 10:59:09 2010
@@ -459,7 +459,7 @@
* \retval 0 on success
* \retval -1 on failure.
*/
- int (*request_cc2)(struct cc_monitor *monitor, int *available_timer_id);
+ int (*request_cc)(struct cc_monitor *monitor, int *available_timer_id);
/*!
* \brief Suspend monitoring.
*
@@ -472,7 +472,7 @@
* \retval 0 on success
* \retval -1 on failure.
*/
- int (*suspend2)(struct cc_monitor *monitor);
+ int (*suspend)(struct cc_monitor *monitor);
/*!
* \brief Status response to an ast_cc_monitor_status_request().
*
@@ -488,7 +488,7 @@
* \retval 0 on success
* \retval -1 on failure.
*/
- int (*status_response2)(struct cc_monitor *monitor, enum ast_device_state devstate);
+ int (*status_response)(struct cc_monitor *monitor, enum ast_device_state devstate);
/*!
* \brief Unsuspend monitoring.
*
@@ -500,7 +500,7 @@
* \retval 0 on success
* \retval -1 on failure.
*/
- int (*unsuspend2)(struct cc_monitor *monitor);
+ int (*unsuspend)(struct cc_monitor *monitor);
/*!
* \brief Cancel the running available timer.
*
@@ -517,7 +517,7 @@
* \retval 0 on success
* \retval -1 on failure.
*/
- int (*cancel_available_timer2)(struct cc_monitor *monitor, int *sched_id);
+ int (*cancel_available_timer)(struct cc_monitor *monitor, int *sched_id);
/*!
* \brief Destroy private data on the monitor.
*
@@ -528,7 +528,7 @@
* all heap-allocated data in the monitor's private_data pointer, including
* the private_data itself.
*/
- void (*destructor2)(void *private_data);
+ void (*destructor)(void *private_data);
};
/*!
Modified: team/group/CCSS_Monitor_Restructure/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS_Monitor_Restructure/main/ccss.c?view=diff&rev=242359&r1=242358&r2=242359
==============================================================================
--- team/group/CCSS_Monitor_Restructure/main/ccss.c (original)
+++ team/group/CCSS_Monitor_Restructure/main/ccss.c Fri Jan 22 10:59:09 2010
@@ -866,21 +866,21 @@
.type = "extension",
};
-static int cc_generic_monitor_request_cc2(struct cc_monitor *monitor, int *available_timer_id);
-static int cc_generic_monitor_suspend2(struct cc_monitor *monitor);
-static int cc_generic_monitor_status_response2(struct cc_monitor *monitor, enum ast_device_state devstate);
-static int cc_generic_monitor_unsuspend2(struct cc_monitor *monitor);
-static int cc_generic_monitor_cancel_available_timer2(struct cc_monitor *monitor, int *sched_id);
-static void cc_generic_monitor_destructor2(void *private_data);
+static int cc_generic_monitor_request_cc(struct cc_monitor *monitor, int *available_timer_id);
+static int cc_generic_monitor_suspend(struct cc_monitor *monitor);
+static int cc_generic_monitor_status_response(struct cc_monitor *monitor, enum ast_device_state devstate);
+static int cc_generic_monitor_unsuspend(struct cc_monitor *monitor);
+static int cc_generic_monitor_cancel_available_timer(struct cc_monitor *monitor, int *sched_id);
+static void cc_generic_monitor_destructor(void *private_data);
static struct ast_cc_monitor_callbacks generic_monitor_cbs = {
.type = "generic",
- .request_cc2 = cc_generic_monitor_request_cc2,
- .suspend2 = cc_generic_monitor_suspend2,
- .status_response2 = cc_generic_monitor_status_response2,
- .unsuspend2 = cc_generic_monitor_unsuspend2,
- .cancel_available_timer2 = cc_generic_monitor_cancel_available_timer2,
- .destructor2 = cc_generic_monitor_destructor2,
+ .request_cc = cc_generic_monitor_request_cc,
+ .suspend = cc_generic_monitor_suspend,
+ .status_response = cc_generic_monitor_status_response,
+ .unsuspend = cc_generic_monitor_unsuspend,
+ .cancel_available_timer = cc_generic_monitor_cancel_available_timer,
+ .destructor = cc_generic_monitor_destructor,
};
struct ao2_container *generic_monitors;
@@ -1062,7 +1062,7 @@
return ast_cc_monitor_failed(monitor->core_id, monitor->interface->name, monitor->interface->monitor_type);
}
-static int cc_generic_monitor_request_cc2(struct cc_monitor *monitor, int *available_timer_id)
+static int cc_generic_monitor_request_cc(struct cc_monitor *monitor, int *available_timer_id)
{
struct generic_monitor_instance_list *generic_list;
struct generic_monitor_instance *generic_instance;
@@ -1106,7 +1106,7 @@
return 0;
}
-static int cc_generic_monitor_suspend2(struct cc_monitor *monitor)
+static int cc_generic_monitor_suspend(struct cc_monitor *monitor)
{
struct generic_monitor_instance_list *generic_list;
struct generic_monitor_instance *generic_instance;
@@ -1137,7 +1137,7 @@
return 0;
}
-static int cc_generic_monitor_status_response2(struct cc_monitor *monitor, enum ast_device_state devstate)
+static int cc_generic_monitor_status_response(struct cc_monitor *monitor, enum ast_device_state devstate)
{
/* The generic monitor will never issue a status request of the other side's agent.
* If this somehow gets called, something really fishy is going on.
@@ -1146,7 +1146,7 @@
return 0;
}
-static int cc_generic_monitor_unsuspend2(struct cc_monitor *monitor)
+static int cc_generic_monitor_unsuspend(struct cc_monitor *monitor)
{
/* When a generic monitor becomes unsuspended, we should do a status request
* to see if the device is available. That way, if it is, we can trigger an
@@ -1158,7 +1158,7 @@
return 0;
}
-static int cc_generic_monitor_cancel_available_timer2(struct cc_monitor *monitor, int *sched_id)
+static int cc_generic_monitor_cancel_available_timer(struct cc_monitor *monitor, int *sched_id)
{
ast_assert(sched_id != NULL);
@@ -1171,7 +1171,7 @@
return 0;
}
-static void cc_generic_monitor_destructor2(void *private_data)
+static void cc_generic_monitor_destructor(void *private_data)
{
struct generic_monitor_pvt *gen_mon_pvt = private_data;
struct generic_monitor_instance_list *generic_list;
@@ -1232,8 +1232,8 @@
* to destroy one of them.
*/
if (monitor->callbacks) {
- monitor->callbacks->cancel_available_timer2(monitor->private_data, &monitor->available_timer_id);
- monitor->callbacks->destructor2(monitor->private_data);
+ monitor->callbacks->cancel_available_timer(monitor->private_data, &monitor->available_timer_id);
+ monitor->callbacks->destructor(monitor->private_data);
}
cc_unref(monitor->interface, "Unreffing tree's reference to interface");
ast_free(monitor->dialable_name);
@@ -1540,7 +1540,7 @@
return;
}
- monitor_callbacks->destructor2(private_data);
+ monitor_callbacks->destructor(private_data);
}
/*!
@@ -2339,7 +2339,7 @@
struct cc_monitor *monitor_iter;
AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN(core_instance->monitors, monitor_iter, next) {
if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
- if (monitor_iter->callbacks->request_cc2(monitor_iter, &monitor_iter->available_timer_id)) {
+ if (monitor_iter->callbacks->request_cc(monitor_iter, &monitor_iter->available_timer_id)) {
AST_DLLIST_REMOVE_CURRENT(next);
} else {
manager_event(EVENT_FLAG_CC, "CCRequestSent",
@@ -2381,7 +2381,7 @@
struct cc_monitor *monitor_iter;
AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN(core_instance->monitors, monitor_iter, next) {
if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
- if (monitor_iter->callbacks->unsuspend2(monitor_iter)) {
+ if (monitor_iter->callbacks->unsuspend(monitor_iter)) {
AST_DLLIST_REMOVE_CURRENT(next);
}
} else if (!has_children(monitor_iter)) {
@@ -2428,7 +2428,7 @@
struct cc_monitor *monitor_iter;
AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN(core_instance->monitors, monitor_iter, next) {
if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
- if (monitor_iter->callbacks->suspend2(monitor_iter)) {
+ if (monitor_iter->callbacks->suspend(monitor_iter)) {
AST_DLLIST_REMOVE_CURRENT(next);
} else {
monitor_iter->is_suspended = 1;
@@ -2463,7 +2463,7 @@
struct cc_monitor *monitor_iter;
AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN(core_instance->monitors, monitor_iter, next) {
if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
- if (monitor_iter->callbacks->cancel_available_timer2(monitor_iter, &monitor_iter->available_timer_id)) {
+ if (monitor_iter->callbacks->cancel_available_timer(monitor_iter, &monitor_iter->available_timer_id)) {
AST_DLLIST_REMOVE_CURRENT(next);
}
} else if (!has_children(monitor_iter)) {
@@ -3057,8 +3057,8 @@
AST_DLLIST_TRAVERSE(core_instance->monitors, monitor_iter, next) {
if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR &&
- monitor_iter->callbacks->status_response2) {
- monitor_iter->callbacks->status_response2(monitor_iter, devstate);
+ monitor_iter->callbacks->status_response) {
+ monitor_iter->callbacks->status_response(monitor_iter, devstate);
}
}
cc_unref(core_instance, "Status response finished. Unref core instance");
More information about the asterisk-commits
mailing list