Skip to content

Commit

Permalink
fix forgotten QoS and Timestamp ext processing for query/reply #1107
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowhatter committed Jun 10, 2024
1 parent 2d1e64c commit 22f59f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions zenoh/src/net/routing/dispatcher/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ impl Primitives for Face {
&self.state,
&msg.wire_expr,
msg.id,
msg.ext_qos,
msg.ext_tstamp,
msg.ext_target,
msg.ext_budget,
msg.ext_timeout,
Expand All @@ -385,6 +387,8 @@ impl Primitives for Face {
&self.tables,
&mut self.state.clone(),
msg.rid,
msg.ext_qos,
msg.ext_tstamp,
msg.ext_respid,
msg.wire_expr,
msg.payload,
Expand Down
15 changes: 11 additions & 4 deletions zenoh/src/net/routing/dispatcher/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,8 @@ impl Timed for QueryCleanup {
&self.tables,
&mut face,
self.qid,
response::ext::QoSType::RESPONSE,
None,
ext_respid,
WireExpr::empty(),
ResponseBody::Err(zenoh::Err {
Expand Down Expand Up @@ -609,6 +611,8 @@ pub fn route_query(
face: &Arc<FaceState>,
expr: &WireExpr,
qid: RequestId,
ext_qos: ext::QoSType,
ext_tstamp: Option<ext::TimestampType>,
ext_target: TargetType,
ext_budget: Option<BudgetType>,
ext_timeout: Option<TimeoutType>,
Expand Down Expand Up @@ -733,8 +737,8 @@ pub fn route_query(
Request {
id: *qid,
wire_expr: key_expr.into(),
ext_qos: ext::QoSType::REQUEST,
ext_tstamp: None,
ext_qos,
ext_tstamp,
ext_nodeid: ext::NodeIdType { node_id: *context },
ext_target,
ext_budget,
Expand Down Expand Up @@ -781,10 +785,13 @@ pub fn route_query(
}
}

#[allow(clippy::too_many_arguments)]
pub(crate) fn route_send_response(
tables_ref: &Arc<TablesLock>,
face: &mut Arc<FaceState>,
qid: RequestId,
ext_qos: ext::QoSType,
ext_tstamp: Option<ext::TimestampType>,
ext_respid: Option<ResponderIdType>,
key_expr: WireExpr,
body: ResponseBody,
Expand Down Expand Up @@ -819,8 +826,8 @@ pub(crate) fn route_send_response(
rid: query.src_qid,
wire_expr: key_expr.to_owned(),
payload: body,
ext_qos: response::ext::QoSType::RESPONSE,
ext_tstamp: None,
ext_qos,
ext_tstamp,
ext_respid,
},
"".to_string(), // @TODO provide the proper key expression of the response for interceptors
Expand Down

0 comments on commit 22f59f6

Please sign in to comment.