diff options
Diffstat (limited to 'src/vlibmemory/memory_vlib.c')
-rw-r--r-- | src/vlibmemory/memory_vlib.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/vlibmemory/memory_vlib.c b/src/vlibmemory/memory_vlib.c index 805438152ce..345b40412c0 100644 --- a/src/vlibmemory/memory_vlib.c +++ b/src/vlibmemory/memory_vlib.c @@ -390,11 +390,11 @@ vl_api_memclnt_delete_t_handler (vl_api_memclnt_delete_t * mp) } } -void +static void vl_api_get_first_msg_id_t_handler (vl_api_get_first_msg_id_t * mp) { vl_api_get_first_msg_id_reply_t *rmp; - unix_shared_memory_queue_t *q; + vl_api_registration_t *regp; uword *p; api_main_t *am = &api_main; vl_api_msg_range_t *rp; @@ -402,8 +402,8 @@ vl_api_get_first_msg_id_t_handler (vl_api_get_first_msg_id_t * mp) u16 first_msg_id = ~0; int rv = -7; /* VNET_API_ERROR_INVALID_VALUE */ - q = vl_api_client_index_to_input_queue (mp->client_index); - if (!q) + regp = vl_api_client_index_to_registration (mp->client_index); + if (!regp) return; if (am->msg_range_by_name == 0) @@ -416,18 +416,16 @@ vl_api_get_first_msg_id_t_handler (vl_api_get_first_msg_id_t * mp) goto out; rp = vec_elt_at_index (am->msg_ranges, p[0]); - first_msg_id = rp->first_msg_id; rv = 0; out: - rmp = vl_msg_api_alloc (sizeof (*rmp)); rmp->_vl_msg_id = ntohs (VL_API_GET_FIRST_MSG_ID_REPLY); rmp->context = mp->context; rmp->retval = ntohl (rv); rmp->first_msg_id = ntohs (first_msg_id); - vl_msg_api_send_shmem (q, (u8 *) & rmp); + vl_msg_api_send (regp, (u8 *) rmp); } /** |