From 206b33fd0b3506766b832e89f3fccb889219b031 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Sun, 2 Jul 2023 15:10:39 +0200 Subject: [PATCH] Filter iterator accepts lines instead of filter --- filter/f-inst.h | 4 ++-- nest/proto.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/filter/f-inst.h b/filter/f-inst.h index fbc59de7..44516174 100644 --- a/filter/f-inst.h +++ b/filter/f-inst.h @@ -67,10 +67,10 @@ struct filter_iterator { void f_add_lines(const struct f_line_item *what, struct filter_iterator *fit); -#define FILTER_ITERATE_INIT(fit, filter, pool) \ +#define FILTER_ITERATE_INIT(fit, line, pool) \ ({ \ BUFFER_INIT((fit)->lines, (pool), 32); \ - BUFFER_PUSH((fit)->lines) = (filter)->root; \ + BUFFER_PUSH((fit)->lines) = (line); \ }) #define FILTER_ITERATE(fit, fi) ({ \ diff --git a/nest/proto.c b/nest/proto.c index 83fbce2c..0304ef7f 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -420,7 +420,7 @@ channel_roa_subscribe_filter(struct channel *c, int dir) #endif struct filter_iterator fit; - FILTER_ITERATE_INIT(&fit, f, c->proto->pool); + FILTER_ITERATE_INIT(&fit, f->root, c->proto->pool); FILTER_ITERATE(&fit, fi) {