summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-03-09 15:03:48 +0100
committerMaria Matejka <mq@ucw.cz>2022-03-09 15:03:48 +0100
commit41572e0c1b53e3aee6e84a2daada97c5f7620697 (patch)
tree5f3dd3d98fc2480ab640a44d38387a4494b105eb /filter
parent9dc1d7782ef792787b49b929d1b331429d23c68e (diff)
parentf81702b7e44ba7f2b264fe14f0f4e1e30913e475 (diff)
Merge commit 'f81702b7' into haugesund
Diffstat (limited to 'filter')
-rw-r--r--filter/filter.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/filter/filter.c b/filter/filter.c
index 6f1e6ea0..625b3ade 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -425,6 +425,23 @@ filter_commit(struct config *new, struct config *old)
}
}
+void channel_filter_dump(const struct filter *f)
+{
+ if (f == FILTER_ACCEPT)
+ debug(" ALL");
+ else if (f == FILTER_REJECT)
+ debug(" NONE");
+ else if (f == FILTER_UNDEF)
+ debug(" UNDEF");
+ else if (f->sym) {
+ ASSERT(f->sym->filter == f);
+ debug(" named filter %s", f->sym->name);
+ } else {
+ debug("\n");
+ f_dump_line(f->root, 2);
+ }
+}
+
void filters_dump_all(void)
{
struct symbol *sym;
@@ -444,19 +461,10 @@ void filters_dump_all(void)
struct channel *c;
WALK_LIST(c, sym->proto->proto->channels) {
debug(" Channel %s (%s) IMPORT", c->name, net_label[c->net_type]);
- if (c->in_filter == FILTER_ACCEPT)
- debug(" ALL\n");
- else if (c->in_filter == FILTER_REJECT)
- debug(" NONE\n");
- else if (c->in_filter == FILTER_UNDEF)
- debug(" UNDEF\n");
- else if (c->in_filter->sym) {
- ASSERT(c->in_filter->sym->filter == c->in_filter);
- debug(" named filter %s\n", c->in_filter->sym->name);
- } else {
- debug("\n");
- f_dump_line(c->in_filter->root, 2);
- }
+ channel_filter_dump(c->in_filter);
+ debug(" EXPORT", c->name, net_label[c->net_type]);
+ channel_filter_dump(c->out_filter);
+ debug("\n");
}
}
}