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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 20 17:04:34 CDT 2009


Author: mmichelson
Date: Tue Oct 20 17:04:30 2009
New Revision: 224854

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=224854
Log:
Better formatting. Still going, though.


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=224854&r1=224853&r2=224854
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Tue Oct 20 17:04:30 2009
@@ -2750,15 +2750,23 @@
 	int *cli_fd = arg;
 	struct cc_core_instance *core_instance = obj;
 
-	ast_cli(*cli_fd, "Core: %d, State: %s\n", core_instance->core_id, cc_state_to_string(core_instance->current_state));
+	ast_cli(*cli_fd, "%d\t%s\n", core_instance->core_id, cc_state_to_string(core_instance->current_state));
 	return 0;
 }
 
 static int cc_cli_output_status(void *data)
 {
 	int *cli_fd = data;
-
-	ao2_t_callback(cc_core_instances, OBJ_NODATA, print_stats_cb, cli_fd, "Printing stats to CLI");
+	int count = ao2_container_count(cc_core_instances);
+
+	if (!count) {
+		ast_cli(*cli_fd, "There are currently no active call completion transactions\n");
+	} else {
+		ast_cli(*cli_fd, "%d Call completion transactions\n", count);
+		ast_cli(*cli_fd, "Core ID\tStatus\n");
+		ast_cli(*cli_fd, "--------------------------\n");
+		ao2_t_callback(cc_core_instances, OBJ_NODATA, print_stats_cb, cli_fd, "Printing stats to CLI");
+	}
 	ast_free(cli_fd);
 	return 0;
 }




More information about the asterisk-commits mailing list