vapi: use the correct my_context_id when disconnecting API clients 99/37799/1
authorMauro Sardara <msardara@cisco.com>
Mon, 12 Dec 2022 14:04:09 +0000 (14:04 +0000)
committerMauro Sardara <msardara@cisco.com>
Tue, 20 Dec 2022 12:09:26 +0000 (12:09 +0000)
commit4b6fb593fbbfe1294b6f620c72dfa0f6842eca69
tree12b4edd6f430c500494d2016e48733c33510bf6d
parent267175fd0416acb5355332693f5769fb0d2d65ee
vapi: use the correct my_context_id when disconnecting API clients

While before the my_client_index variable was stored as global variable
in api_main_t, after commit 2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f
the my_client_index becomes part of vapi_ctx_t.

Each API client (internal/external) connected to VPP stores its
client index in vapi_ctx_t.

The issue is in the client disconnection. The vapi_disconnect is
untouched in patch 2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f,
so it keeps the behavior of using the my_client_index stored
in api_main_t.

Ticket: VPP-2069
Type: fix
Fixes: 2ca88ff97884ec9ed20a853b13cee6d86f9c9d0f

Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: Idf8c1d1056cbd631cc3057cf7acc486216fa8303
(cherry picked from commit 8c626b41eaab5c74e7e023205f1c6cd655d40f44)
src/vpp-api/vapi/vapi.c