[asterisk-commits] mmichelson: branch group/CCSS r244642 - /team/group/CCSS/main/ccss.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 3 17:06:44 CST 2010
Author: mmichelson
Date: Wed Feb 3 17:06:40 2010
New Revision: 244642
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=244642
Log:
Fix faulty logic in cc report status CLI command.
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=244642&r1=244641&r2=244642
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Wed Feb 3 17:06:40 2010
@@ -3524,19 +3524,22 @@
static void cc_cli_print_monitor_stats(struct ast_cc_monitor *monitor, int fd, int parent_id)
{
+ struct ast_cc_monitor *child_monitor_iter = monitor;
if (!monitor) {
return;
}
- if (monitor->parent_id == parent_id) {
- ast_cli(fd, "\t\t|-->%s", monitor->interface->name);
- if (monitor->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
- ast_cli(fd, "(%s)", cc_service_to_string(monitor->service_offered));
+ ast_cli(fd, "\t\t|-->%s", monitor->interface->name);
+ if (monitor->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
+ ast_cli(fd, "(%s)", cc_service_to_string(monitor->service_offered));
+ }
+ ast_cli(fd, "\n");
+
+ while ((child_monitor_iter = AST_DLLIST_NEXT(child_monitor_iter, next))) {
+ if (child_monitor_iter->parent_id == monitor->id) {
+ cc_cli_print_monitor_stats(child_monitor_iter, fd, child_monitor_iter->id);
}
- ast_cli(fd, "\n");
- }
-
- cc_cli_print_monitor_stats(AST_DLLIST_NEXT(monitor, next), fd, monitor->id);
+ }
}
static int print_stats_cb(void *obj, void *arg, int flags)
More information about the asterisk-commits
mailing list