diff options
author | Florin Coras <fcoras@cisco.com> | 2018-11-20 11:31:26 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-11-21 09:05:45 +0000 |
commit | c1f5a4336036e3f2d1f6746f39ce610312254272 (patch) | |
tree | 297539f8c961c071fe2450fa17859579e07eb7d3 /src/vcl | |
parent | e9cebdf4c12adf7962ab2a2053789c93d70c33d3 (diff) |
session: cleanup use of api_client_index
Change-Id: I8a680be62ab91d2ccb144641981a635506973a49
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl')
-rw-r--r-- | src/vcl/vcl_bapi.c | 3 | ||||
-rw-r--r-- | src/vcl/vcl_cfg.c | 2 | ||||
-rw-r--r-- | src/vcl/vcl_private.h | 4 | ||||
-rw-r--r-- | src/vcl/vppcom.c | 1 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c index 7dd601cf737..cc494ed3b6d 100644 --- a/src/vcl/vcl_bapi.c +++ b/src/vcl/vcl_bapi.c @@ -131,6 +131,7 @@ vl_api_application_attach_reply_t_handler (vl_api_application_attach_reply_t * return; } + vcm->app_index = clib_net_to_host_u32 (mp->app_index); vcm->app_state = STATE_APP_ATTACHED; } @@ -429,7 +430,7 @@ vcl_send_app_worker_add_del (u8 is_add) mp->_vl_msg_id = ntohs (VL_API_APP_WORKER_ADD_DEL); mp->client_index = vcm->my_client_index; - mp->app_api_index = clib_host_to_net_u32 (vcm->main_api_client_index); + mp->app_index = clib_host_to_net_u32 (vcm->app_index); mp->context = wrk_index; mp->is_add = is_add; if (!is_add) diff --git a/src/vcl/vcl_cfg.c b/src/vcl/vcl_cfg.c index 3e92941d720..402bb91315f 100644 --- a/src/vcl/vcl_cfg.c +++ b/src/vcl/vcl_cfg.c @@ -22,7 +22,7 @@ static vppcom_main_t _vppcom_main = { .debug = VPPCOM_DEBUG_INIT, .is_init = 0, - .main_api_client_index = ~0, + .app_index = ~0, .my_client_index = ~0 }; diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h index 7bb0dbc5a66..0204bd5493e 100644 --- a/src/vcl/vcl_private.h +++ b/src/vcl/vcl_private.h @@ -282,8 +282,8 @@ typedef struct vppcom_main_t_ /** Current pid, may be different from main_pid if forked child */ pid_t current_pid; - /** Main process api client index. It's used by vpp to identify the app */ - u32 main_api_client_index; + /** App's index in vpp. It's used by vpp to identify the app */ + u32 app_index; /** API client handle */ u32 my_client_index; diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 669f04fe1e3..f20167226e8 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -773,7 +773,6 @@ vppcom_app_create (char *app_name) VERR ("couldn't connect to VPP!"); return rv; } - vcm->main_api_client_index = vcm->my_client_index; VDBG (0, "sending session enable"); rv = vppcom_app_session_enable (); if (rv) |