aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/socket_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibmemory/socket_api.c')
-rw-r--r--src/vlibmemory/socket_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c
index 32d1e704bd8..eb0466dc76d 100644
--- a/src/vlibmemory/socket_api.c
+++ b/src/vlibmemory/socket_api.c
@@ -118,7 +118,7 @@ vl_socket_api_send (vl_api_registration_t * rp, u8 * elem)
#endif
socket_main_t *sm = &socket_main;
u16 msg_id = ntohs (*(u16 *) elem);
- api_main_t *am = &api_main;
+ api_main_t *am = vlibapi_get_main ();
msgbuf_t *mb = (msgbuf_t *) (elem - offsetof (msgbuf_t, data));
vl_api_registration_t *sock_rp;
clib_file_main_t *fm = &file_main;
@@ -445,7 +445,7 @@ vl_api_sockclnt_create_t_handler (vl_api_sockclnt_create_t * mp)
{
vl_api_registration_t *regp;
vl_api_sockclnt_create_reply_t *rp;
- api_main_t *am = &api_main;
+ api_main_t *am = vlibapi_get_main ();
hash_pair_t *hp;
int rv = 0;
u32 nmsg = hash_elts (am->msg_index_by_name_and_crc);
@@ -606,7 +606,7 @@ vl_api_sock_init_shm_t_handler (vl_api_sock_init_shm_t * mp)
ssvm_private_t _memfd_private, *memfd = &_memfd_private;
svm_map_region_args_t _args, *a = &_args;
vl_api_registration_t *regp;
- api_main_t *am = &api_main;
+ api_main_t *am = vlibapi_get_main ();
svm_region_t *vlib_rp;
clib_file_t *cf;
vl_api_shm_elem_config_t *config = 0;