[asterisk-commits] mmichelson: branch group/CCSS r219900 - /team/group/CCSS/main/ccss.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 23 12:53:58 CDT 2009
Author: mmichelson
Date: Wed Sep 23 12:53:54 2009
New Revision: 219900
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=219900
Log:
Keep up with monitor request count. That was easy.
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=219900&r1=219899&r2=219900
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Wed Sep 23 12:53:54 2009
@@ -921,6 +921,7 @@
ao2_t_ref(new_link->parent, +1, "Link's parent reference");
new_link->core_id = core_id;
new_link->service = tree_item->service_offered;
+ ast_atomic_fetchadd_int(new_monitor->num_requests, +1);
AST_LIST_INSERT_TAIL(&parent->child_links, new_link, next_child);
AST_LIST_INSERT_TAIL(&new_monitor->parent_links, new_link, next_parent);
ast_log(LOG_NOTICE, "Created link with core_id %d, parent %s and child %s\n", new_link->core_id, new_link->parent->interface->name, new_link->child->interface->name);
@@ -981,6 +982,7 @@
{
ast_log(LOG_NOTICE, "Destroying link with parent %s and child %s\n",
link->parent->interface->name, link->child->interface->name);
+ ast_atomic_fetchadd_int(link->child->num_requests, -1);
ao2_t_ref(link->child, -1, "Unref link's child");
ao2_t_ref(link->parent, -1, "Unref link's parent");
ast_free(link);
More information about the asterisk-commits
mailing list