X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fhs_apps%2Fsapi%2Fvpp_echo_bapi.c;fp=src%2Fplugins%2Fhs_apps%2Fsapi%2Fvpp_echo_bapi.c;h=c3b53c86ae2a42b8289adb548c17a0b0dfa91d4a;hb=85a9c101bffe99da141b496f95966258b922a440;hp=2e997096f85c2e710cd3d38c96812f105ac4ae3b;hpb=eb63caea2aacb60e05f956f0720d95267398e3ff;p=vpp.git diff --git a/src/plugins/hs_apps/sapi/vpp_echo_bapi.c b/src/plugins/hs_apps/sapi/vpp_echo_bapi.c index 2e997096f85..c3b53c86ae2 100644 --- a/src/plugins/hs_apps/sapi/vpp_echo_bapi.c +++ b/src/plugins/hs_apps/sapi/vpp_echo_bapi.c @@ -265,11 +265,11 @@ echo_segment_lookup (u64 segment_handle) clib_spinlock_lock (&em->segment_handles_lock); segment_idxp = hash_get (em->shared_segment_handles, segment_handle); clib_spinlock_unlock (&em->segment_handles_lock); - if (!segment_idxp) - return ~0; + if (segment_idxp) + return ((u32) *segment_idxp); ECHO_LOG (2, "Segment not mapped (0x%lx)", segment_handle); - return ((u32) *segment_idxp); + return ~0; } void