Skip to content

Commit a27c2f0

Browse files
committed
API changed...
1 parent b5562ec commit a27c2f0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

zenoh/src/net/routing/dispatcher/pubsub.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ pub fn route_data(
307307
.map(|i| i.load())
308308
.and_then(|i| i.is_empty().not().then_some(i))
309309
{
310-
let cache = prefix.get_ingress_cache(face);
310+
let cache_guard = prefix.get_ingress_cache(face, &interceptor);
311+
let cache = cache_guard.as_ref().and_then(|c| c.get_ref().as_ref());
311312
let ctx = &mut RoutingContext::new(NetworkMessageMut {
312313
body: NetworkBodyMut::Push(msg),
313314
reliability,
@@ -369,7 +370,9 @@ pub fn route_data(
369370
.map(|i| i.load())
370371
.and_then(|i| i.is_empty().not().then_some(i))
371372
{
372-
let cache = prefix.get_egress_cache(face);
373+
let cache_guard = prefix.get_ingress_cache(face, &interceptor);
374+
let cache = cache_guard.as_ref().and_then(|c| c.get_ref().as_ref());
375+
373376
let ctx = &mut RoutingContext::new(NetworkMessageMut {
374377
body: NetworkBodyMut::Push(msg),
375378
reliability,
@@ -420,13 +423,15 @@ pub fn route_data(
420423
.map(|i| i.load())
421424
.and_then(|i| i.is_empty().not().then_some(i))
422425
{
423-
let cache = prefix.get_egress_cache(face);
426+
let cache_guard = prefix.get_ingress_cache(face, &interceptor);
427+
let cache = cache_guard.as_ref().and_then(|c| c.get_ref().as_ref());
428+
424429
let ctx = &mut RoutingContext::new(NetworkMessageMut {
425430
body: NetworkBodyMut::Push(msg),
426431
reliability,
427432
});
428433

429-
if !interceptor.intercept(ctx, cache) {
434+
if !interceptor.intercept(ctx, cache.as_deref()) {
430435
continue;
431436
}
432437
};

0 commit comments

Comments
 (0)