Skip to content

Commit

Permalink
Populate ext_wire_expr of UndeclareSubscriber and UndeclareQueryable …
Browse files Browse the repository at this point in the history
…messages to expose their keyexpr in RoutingContext for interceptors
  • Loading branch information
oteffahi committed Oct 30, 2024
1 parent d5adf0f commit cafeaba
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 30 deletions.
8 changes: 6 additions & 2 deletions zenoh/src/net/routing/hat/client/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ fn propagate_forget_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -231,7 +233,9 @@ pub(super) fn undeclare_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down
8 changes: 6 additions & 2 deletions zenoh/src/net/routing/hat/client/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ fn propagate_forget_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -232,7 +234,9 @@ pub(super) fn undeclare_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down
16 changes: 12 additions & 4 deletions zenoh/src/net/routing/hat/linkstate_peer/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@ fn propagate_forget_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -428,7 +430,9 @@ fn propagate_forget_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -554,7 +558,9 @@ pub(super) fn undeclare_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -586,7 +592,9 @@ pub(super) fn undeclare_simple_subscription(
body: DeclareBody::UndeclareSubscriber(
UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
},
),
},
Expand Down
16 changes: 12 additions & 4 deletions zenoh/src/net/routing/hat/linkstate_peer/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ fn propagate_forget_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -444,7 +446,9 @@ fn propagate_forget_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -576,7 +580,9 @@ pub(super) fn undeclare_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -607,7 +613,9 @@ pub(super) fn undeclare_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down
16 changes: 12 additions & 4 deletions zenoh/src/net/routing/hat/p2p_peer/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ fn propagate_forget_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -278,7 +280,9 @@ fn propagate_forget_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -319,7 +323,9 @@ pub(super) fn undeclare_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -347,7 +353,9 @@ pub(super) fn undeclare_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down
16 changes: 12 additions & 4 deletions zenoh/src/net/routing/hat/p2p_peer/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ fn propagate_forget_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -246,7 +248,9 @@ fn propagate_forget_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -292,7 +296,9 @@ pub(super) fn undeclare_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -320,7 +326,9 @@ pub(super) fn undeclare_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down
20 changes: 15 additions & 5 deletions zenoh/src/net/routing/hat/router/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,9 @@ fn propagate_forget_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -466,7 +468,9 @@ fn propagate_forget_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -514,7 +518,9 @@ fn propagate_forget_simple_subscription_to_peers(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -680,7 +686,9 @@ pub(super) fn undeclare_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -712,7 +720,9 @@ pub(super) fn undeclare_simple_subscription(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down
20 changes: 15 additions & 5 deletions zenoh/src/net/routing/hat/router/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,9 @@ fn propagate_forget_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -592,7 +594,9 @@ fn propagate_forget_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -640,7 +644,9 @@ fn propagate_forget_simple_queryable_to_peers(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -819,7 +825,9 @@ pub(super) fn undeclare_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down Expand Up @@ -851,7 +859,9 @@ pub(super) fn undeclare_simple_queryable(
ext_nodeid: ext::NodeIdType::DEFAULT,
body: DeclareBody::UndeclareQueryable(UndeclareQueryable {
id,
ext_wire_expr: WireExprType::null(),
ext_wire_expr: WireExprType {
wire_expr: res.expr().into(),
},
}),
},
res.expr(),
Expand Down

0 comments on commit cafeaba

Please sign in to comment.