aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/api.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibmemory/api.h')
-rw-r--r--src/vlibmemory/api.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vlibmemory/api.h b/src/vlibmemory/api.h
index d66c4398764..dc1e75e484d 100644
--- a/src/vlibmemory/api.h
+++ b/src/vlibmemory/api.h
@@ -55,10 +55,8 @@ vl_api_can_send_msg (vl_api_registration_t * rp)
always_inline vl_api_registration_t *
vl_api_client_index_to_registration (u32 index)
{
- vl_api_registration_t *reg =
- vl_socket_api_client_index_to_registration (index);
- if (reg && reg->registration_type != REGISTRATION_TYPE_FREE)
- return reg;
+ if (vl_socket_api_registration_handle_is_valid (ntohl (index)))
+ return vl_socket_api_client_handle_to_registration (ntohl (index));
return vl_mem_api_client_index_to_registration (index);
}