[asterisk-commits] mmichelson: branch group/CCSS r215156 - in /team/group/CCSS: include/asterisk...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 1 14:10:34 CDT 2009
Author: mmichelson
Date: Tue Sep 1 14:10:30 2009
New Revision: 215156
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215156
Log:
It compiles now with the exception of an unused structure.
Modified:
team/group/CCSS/include/asterisk/ccss.h
team/group/CCSS/main/ccss.c
Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=215156&r1=215155&r2=215156
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Tue Sep 1 14:10:30 2009
@@ -488,8 +488,10 @@
int (*suspend)(struct ast_cc_monitor *monitor, const int core_id);
/* Status request callback */
enum ast_device_state(*status_request)(struct ast_cc_monitor *monitor, const int core_id);
+ /* Unsuspend monitoring callback */
+ int (*unsuspend)(struct ast_cc_monitor *monitor, const int core_id);
/* Destroy callback (XXX handled in ao2 destructor?) */
- void (*destructor)(struct ast_monitor *monitor, const int core_id);
+ void (*destructor)(struct ast_cc_monitor *monitor, const int core_id);
/* Pass status upstream callback (XXX ???) */
};
Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=215156&r1=215155&r2=215156
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Tue Sep 1 14:10:30 2009
@@ -492,11 +492,8 @@
struct ast_cc_agent *agent;
/*!
* Reference to the root of the monitor tree
- * commented out until struct is actually defined.
- */
- /*
+ */
struct ast_cc_monitor *monitor;
- */
};
static int pending_offer_hash_fn(const void *obj, const int flags)
@@ -763,7 +760,13 @@
ast_free(agent_pvt);
}
-static int cc_monitor_init(const int core_id)
+static struct ast_cc_monitor *cc_monitor_instance_init(enum ast_cc_monitor_type type, const char * const name)
+{
+ /* STUB */
+ return NULL;
+}
+
+static int cc_monitor_tree_init(const int core_id)
{
/* Oh boy
*
@@ -791,15 +794,15 @@
*/
struct cc_core_instance *core_instance;
- struct cc_core_pending_offer *pending_offer;
+ struct core_pending_cc_offer *pending_offer;
struct cc_core_instance instance_finder = { .core_id = core_id };
- struct cc_core_pending_offer offer_finder = { .core_id = core_id };
+ struct core_pending_cc_offer offer_finder = { .core_id = core_id };
if (!(core_instance = ao2_find(cc_core_instances, &instance_finder, OBJ_POINTER))) {
return -1;
}
- if (!(pending_offer = ao2_find(cc_core_pending_offers, &offer_finder, OBJ_POINTER))) {
+ if (!(pending_offer = ao2_find(pending_cc_offers, &offer_finder, OBJ_POINTER))) {
ao2_ref(core_instance, -1);
return -1;
}
@@ -857,7 +860,7 @@
(core_instance->current_state == CC_AVAILABLE && !strcmp(core_instance->agent->callbacks->type, "generic")))) {
ast_log(LOG_NOTICE, "Invalid state change request. Cannot go from %d to %d\n", core_instance->current_state, args->state);
}
- cc_monitor_init(args->core_id);
+ cc_monitor_tree_init(args->core_id);
break;
case CC_ACTIVE:
/* Either
@@ -1049,11 +1052,9 @@
if (!(cc_sched_thread = ast_sched_thread_create())) {
return -1;
}
- /*
- if (!(root_monitor = cc_monitor_init(AST_CC_ROOT_MONITOR, "root", ))) {
- return -1;
- }
- */
+ if (!(root_monitor = cc_monitor_instance_init(AST_CC_ROOT_MONITOR, "root"))) {
+ return -1;
+ }
ast_log(LOG_NOTICE, "Successfully created CC sched_thread context\n");
res = ast_register_application2(ccreq_app, ccreq_exec, NULL, NULL, NULL);
res |= ast_register_application2(cccancel_app, cccancel_exec, NULL, NULL, NULL);
More information about the asterisk-commits
mailing list