[asterisk-commits] mmichelson: branch group/CCSS r216638 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 4 16:07:01 CDT 2009


Author: mmichelson
Date: Fri Sep  4 16:07:00 2009
New Revision: 216638

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=216638
Log:
Fill in more necessary information for requesting CC.


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=216638&r1=216637&r2=216638
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Sep  4 16:07:00 2009
@@ -1152,7 +1152,10 @@
 				(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);
 		}
+		core_instance->current_state = args->state;
 		cc_monitor_tree_init(args->core_id);
+		/* It doesn't matter what service we state for the root monitor, so we just use AST_CC_NONE */
+		core_instance->monitor->callbacks->request_cc(core_instance->monitor, args->core_id, AST_CC_NONE);
 		break;
 	case CC_ACTIVE:
 		/* Either
@@ -1327,7 +1330,7 @@
 		}
 		ast_assert(link_iter->child != NULL);
 		ast_assert(link_iter->child->callbacks != NULL);
-		link_iter->child->callbacks->request_cc(link_iter->child, core_id, service);
+		link_iter->child->callbacks->request_cc(link_iter->child, core_id, link_iter->service);
 		/* XXX Should check the return value and potentially prune
 		 * out monitors that return unsuccessfully since they were
 		 * not able to properly request CC




More information about the asterisk-commits mailing list