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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 30 14:35:14 CST 2009


Author: mmichelson
Date: Wed Dec 30 14:35:12 2009
New Revision: 236894

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=236894
Log:
Make sure to print only relevant information in cc report status.


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=236894&r1=236893&r2=236894
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Wed Dec 30 14:35:12 2009
@@ -3447,7 +3447,7 @@
 	return;
 }
 
-static void cc_cli_print_monitor_stats(struct ast_cc_monitor *monitor, int fd, enum ast_cc_service_type service)
+static void cc_cli_print_monitor_stats(int core_id, struct ast_cc_monitor *monitor, int fd, enum ast_cc_service_type service)
 {
 	struct ast_cc_monitor_link *link_iter;
 	if (monitor->interface->monitor_class != AST_CC_ROOT_MONITOR) {
@@ -3458,7 +3458,9 @@
 		ast_cli(fd, "\n");
 	}
 	AST_LIST_TRAVERSE(&monitor->child_links, link_iter, next_child) {
-		cc_cli_print_monitor_stats(link_iter->child, fd, link_iter->service);
+		if (core_id == link_iter->core_id) {
+			cc_cli_print_monitor_stats(core_id, link_iter->child, fd, link_iter->service);
+		}
 	}
 }
 
@@ -3470,7 +3472,7 @@
 	ast_cli(*cli_fd, "%d\t\t%s\t\t%s\n", core_instance->core_id, core_instance->agent->interface,
 			cc_state_to_string(core_instance->current_state));
 	if (core_instance->monitor) {
-		cc_cli_print_monitor_stats(core_instance->monitor, *cli_fd, AST_CC_NONE);
+		cc_cli_print_monitor_stats(core_instance->core_id, core_instance->monitor, *cli_fd, AST_CC_NONE);
 	}
 	return 0;
 }




More information about the asterisk-commits mailing list