summaryrefslogtreecommitdiff
path: root/nest/cmds.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-05-25 23:37:50 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-05-25 23:37:50 +0200
commita1dc5267602062562f9adca7acfbbc2fee3b315e (patch)
tree8c9a6bbf78eedb116ee93c2437284c56083dac51 /nest/cmds.c
parent4b2aef8857a9ac23015e410930d2162d945892f0 (diff)
parentb7761af34dc4ed3f1bdf874eb85d743b931b0af6 (diff)
Merge branch 'master' into int-new
Diffstat (limited to 'nest/cmds.c')
-rw-r--r--nest/cmds.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/nest/cmds.c b/nest/cmds.c
index f0a14425..2bc672ea 100644
--- a/nest/cmds.c
+++ b/nest/cmds.c
@@ -46,22 +46,24 @@ cmd_show_status(void)
void
cmd_show_symbols(struct sym_show_data *sd)
{
- int pos = 0;
- struct symbol *sym = sd->sym;
-
- if (sym)
- cli_msg(1010, "%-8s\t%s", sym->name, cf_symbol_class_name(sym));
+ if (sd->sym)
+ cli_msg(1010, "%-8s\t%s", sd->sym->name, cf_symbol_class_name(sd->sym));
else
+ {
+ HASH_WALK(config->sym_hash, next, sym)
{
- while (sym = cf_walk_symbols(config, sym, &pos))
- {
- if (sd->type && (sym->class != sd->type))
- continue;
-
- cli_msg(-1010, "%-8s\t%s", sym->name, cf_symbol_class_name(sym));
- }
- cli_msg(0, "");
+ if (!sym->scope->active)
+ continue;
+
+ if (sd->type && (sym->class != sd->type))
+ continue;
+
+ cli_msg(-1010, "%-8s\t%s", sym->name, cf_symbol_class_name(sym));
}
+ HASH_WALK_END;
+
+ cli_msg(0, "");
+ }
}
static void