summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/socket_api.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-11-27 11:42:13 -0500
committerFlorin Coras <florin.coras@gmail.com>2019-12-10 01:13:05 +0000
commit39d69112fcec114fde34955ceb41555221d3ba11 (patch)
tree156f21a0e66bf596b2c1e5184d82c80d99ea0a79 /src/vlibmemory/socket_api.c
parent6b3f25caff262b536a5449ac5461dd041c92a655 (diff)
api: multiple connections per process
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
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;