diff options
author | Klement Sekera <ksekera@cisco.com> | 2018-07-04 13:43:46 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-07-05 09:01:22 +0000 |
commit | dab732a18c39d13af1770b55d7cef2359ea66412 (patch) | |
tree | c37b36dba8bdbc4fdf6dd91aad0a3d4ea9b8ce73 /src/vpp-api/vapi/vapi.hpp | |
parent | ef8db3679746792403589fb54fa0bbb9e13245dd (diff) |
VPP-1335 vapi crash when memclnt_keepalive received
Change-Id: If33a7cc6c76147fd3ea9d8118370e7a508819b81
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vpp-api/vapi/vapi.hpp')
-rw-r--r-- | src/vpp-api/vapi/vapi.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vpp-api/vapi/vapi.hpp b/src/vpp-api/vapi/vapi.hpp index 28357db420c..a1e33a93fd4 100644 --- a/src/vpp-api/vapi/vapi.hpp +++ b/src/vpp-api/vapi/vapi.hpp @@ -195,15 +195,17 @@ public: * @param name application name * @param chroot_prefix shared memory prefix * @param max_queued_request max number of outstanding requests queued + * @param handle_keepalives handle memclnt_keepalive automatically * * @return VAPI_OK on success, other error code on error */ vapi_error_e connect (const char *name, const char *chroot_prefix, - int max_outstanding_requests, int response_queue_size) + int max_outstanding_requests, int response_queue_size, + bool handle_keepalives = true) { return vapi_connect (vapi_ctx, name, chroot_prefix, max_outstanding_requests, response_queue_size, - VAPI_MODE_BLOCKING); + VAPI_MODE_BLOCKING, handle_keepalives); } /** @@ -579,14 +581,14 @@ private: static void set_msg_id (vapi_msg_id_t id) { - assert ((INVALID_MSG_ID == *msg_id_holder ()) || + assert ((VAPI_INVALID_MSG_ID == *msg_id_holder ()) || (id == *msg_id_holder ())); *msg_id_holder () = id; } static vapi_msg_id_t *msg_id_holder () { - static vapi_msg_id_t my_id{INVALID_MSG_ID}; + static vapi_msg_id_t my_id{VAPI_INVALID_MSG_ID}; return &my_id; } |