vapi: use the correct my_context_id when disconnecting API clients 17/37817/8
authorMauro Sardara <msardara@cisco.com>
Mon, 12 Dec 2022 14:04:09 +0000 (14:04 +0000)
committerOle Tr�an <otroan@employees.org>
Tue, 20 Dec 2022 12:08:06 +0000 (12:08 +0000)
commit8c626b41eaab5c74e7e023205f1c6cd655d40f44
tree6e4cd5e362d20dde87567e595f88d8271a95cf7d
parentdb823ed6e9543741f6969ff160314093002e037e
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
src/vpp-api/vapi/vapi.c