mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Filter iterator accepts lines instead of filter
This commit is contained in:
parent
b43580d77d
commit
206b33fd0b
@ -67,10 +67,10 @@ struct filter_iterator {
|
|||||||
|
|
||||||
void f_add_lines(const struct f_line_item *what, struct filter_iterator *fit);
|
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_INIT((fit)->lines, (pool), 32); \
|
||||||
BUFFER_PUSH((fit)->lines) = (filter)->root; \
|
BUFFER_PUSH((fit)->lines) = (line); \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define FILTER_ITERATE(fit, fi) ({ \
|
#define FILTER_ITERATE(fit, fi) ({ \
|
||||||
|
@ -420,7 +420,7 @@ channel_roa_subscribe_filter(struct channel *c, int dir)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct filter_iterator fit;
|
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)
|
FILTER_ITERATE(&fit, fi)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user