[asterisk-commits] mmichelson: branch group/CCSS r215886 - /team/group/CCSS/main/ccss.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 3 07:18:50 CDT 2009
Author: mmichelson
Date: Thu Sep 3 07:18:45 2009
New Revision: 215886
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215886
Log:
Add some debugging lines
Modified:
team/group/CCSS/main/ccss.c
Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=215886&r1=215885&r2=215886
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Sep 3 07:18:45 2009
@@ -702,7 +702,7 @@
static int offer_timer_expire(const void *data)
{
const struct ast_cc_agent *agent = data;
- ast_log(LOG_NOTICE, "Hello?\n");
+ ast_log(LOG_NOTICE, "Queuing change request because offer timer has expired.\n");
ast_cc_request_state_change(CC_FAILED, agent->core_id, "Generic agent offer timer expired");
return 0;
}
@@ -828,6 +828,7 @@
monitor->callbacks->init(monitor, core_id);
AST_LIST_HEAD_INIT(&monitor->child_links);
AST_LIST_HEAD_INIT(&monitor->parent_links);
+ ast_log(LOG_NOTICE, "Created new monitor named %s of type %s\n", monitor->name, monitor->monitor_type);
ao2_link(cc_monitors, monitor);
return monitor;
}
@@ -837,13 +838,12 @@
struct ast_cc_monitor *new_monitor;
struct ast_cc_monitor_link *new_link;
struct ast_cc_monitor *finder = alloca(sizeof(finder) + strlen(interface->name));
- int monitor_created = 1;
strcpy(finder->name, interface->name);
finder->monitor_class = interface->monitor_class;
if ((new_monitor = ao2_find(cc_monitors, &finder, OBJ_POINTER))) {
- monitor_created = 0;
+ ast_log(LOG_NOTICE, "Found monitor %s in tree. Re-using\n", new_monitor->name);
} else if (!(new_monitor = cc_monitor_instance_init(interface->monitor_class,
interface->monitor_type, interface->name, core_id))) {
return NULL;
@@ -863,6 +863,7 @@
ao2_ref(new_link->parent, +1);
AST_LIST_INSERT_TAIL(&parent->child_links, new_link, next);
AST_LIST_INSERT_TAIL(&new_monitor->parent_links, new_link, next);
+ ast_log(LOG_NOTICE, "Created link with parent %s and child %s\n", new_link->parent->name, new_link->child->name);
ao2_ref(new_monitor, -1);
return new_monitor;
}
More information about the asterisk-commits
mailing list