summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/memory_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibmemory/memory_client.c')
-rw-r--r--src/vlibmemory/memory_client.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/vlibmemory/memory_client.c b/src/vlibmemory/memory_client.c
index 239cbfee36f..79344a6af68 100644
--- a/src/vlibmemory/memory_client.c
+++ b/src/vlibmemory/memory_client.c
@@ -270,22 +270,17 @@ vl_api_memclnt_delete_reply_t_handler (vl_api_memclnt_delete_reply_t * mp)
am->vl_input_queue = 0;
}
-int
-vl_client_disconnect (void)
+void
+vl_client_send_disconnect (void)
{
vl_api_memclnt_delete_t *mp;
- vl_api_memclnt_delete_reply_t *rp;
- svm_queue_t *vl_input_queue;
vl_shmem_hdr_t *shmem_hdr;
- time_t begin;
api_main_t *am = &api_main;
ASSERT (am->vlib_rp);
shmem_hdr = am->shmem_hdr;
ASSERT (shmem_hdr && shmem_hdr->vl_input_queue);
- vl_input_queue = am->vl_input_queue;
-
mp = vl_msg_api_alloc (sizeof (vl_api_memclnt_delete_t));
clib_memset (mp, 0, sizeof (*mp));
mp->_vl_msg_id = ntohs (VL_API_MEMCLNT_DELETE);
@@ -293,6 +288,18 @@ vl_client_disconnect (void)
mp->handle = (uword) am->my_registration;
vl_msg_api_send_shmem (shmem_hdr->vl_input_queue, (u8 *) & mp);
+}
+
+int
+vl_client_disconnect (void)
+{
+ vl_api_memclnt_delete_reply_t *rp;
+ svm_queue_t *vl_input_queue;
+ api_main_t *am = &api_main;
+ time_t begin;
+
+ vl_input_queue = am->vl_input_queue;
+ vl_client_send_disconnect ();
/*
* Have to be careful here, in case the client is disconnecting