summaryrefslogtreecommitdiff
path: root/proto/pipe
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-27 19:04:22 +0200
committerMaria Matejka <mq@ucw.cz>2022-06-27 19:04:24 +0200
commitbeb5f78ada79ac90f31f2c4923302c74d9ab38bf (patch)
treeb6f37568d57428d7bc9df103c84922b1076e1f5e /proto/pipe
parentb867c798c3e42c875311a79fe53a36d4a5bfd126 (diff)
Preexport callback now takes the channel instead of protocol as argument
Passing protocol to preexport was in fact a historical relic from the old times when channels weren't a thing. Refactoring that to match current extensibility needs.
Diffstat (limited to 'proto/pipe')
-rw-r--r--proto/pipe/pipe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c
index f991d09a..481f5804 100644
--- a/proto/pipe/pipe.c
+++ b/proto/pipe/pipe.c
@@ -101,11 +101,11 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o
}
static int
-pipe_preexport(struct proto *P, rte **ee, struct linpool *p UNUSED)
+pipe_preexport(struct channel *C, rte **ee, struct linpool *p UNUSED)
{
struct proto *pp = (*ee)->sender->proto;
- if (pp == P)
+ if (pp == C->proto)
return -1; /* Avoid local loops automatically */
return 0;