summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2021-03-16 20:10:00 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2021-03-16 20:10:00 +0100
commit2f981534902302cbd13cdb12d4f0c6e9a255687a (patch)
treec48754a98a591484e9d7a16ca05d3d287076b58c /nest/proto.c
parentae9ae864d3fec20a74ce2567536e186ce178d032 (diff)
Pipe: Propagate debug flags from protocol to channels
Pipe channels are kind-of implicit, so setting protocol debug flags should also set pipe debug flags.
Diffstat (limited to 'nest/proto.c')
-rw-r--r--nest/proto.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nest/proto.c b/nest/proto.c
index b3c6fa47..f05fbe92 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -2210,10 +2210,17 @@ proto_cmd_reload(struct proto *p, uintptr_t dir, int cnt UNUSED)
cli_msg(-15, "%s: reloading", p->name);
}
+extern void pipe_update_debug(struct proto *P);
+
void
proto_cmd_debug(struct proto *p, uintptr_t mask, int cnt UNUSED)
{
p->debug = mask;
+
+#ifdef CONFIG_PIPE
+ if (p->proto == &proto_pipe)
+ pipe_update_debug(p);
+#endif
}
void