papi: fix socket api max message id calculation 26/35726/5
authorVladislav Grishenko <[email protected]>
Fri, 29 Oct 2021 15:40:52 +0000 (20:40 +0500)
committerDamjan Marion <[email protected]>
Tue, 4 Mar 2025 10:04:14 +0000 (10:04 +0000)
commit75b66b374067ddfc4d9ed316d66250c4e60db985
treee3acc58a9734ddd904bf2e43dc1a2b90bb12256b
parent86abfc3e0aee3a1a1ae9107d03d98bf1cdcedd33
papi: fix socket api max message id calculation

In case of sparse message ids due fixed offsets, length of
the message table is less than max message id, causing
"IndexError: list assignment index out of range" exception
in _register_function() due "self.id_msgdef[i] = msg".

Unlike shmem api, socket api needs to use max id.

Type: fix
Signed-off-by: Vladislav Grishenko <[email protected]>
Change-Id: Ib777db9dabc3a5a3ff83f07ec211cf2fb3c15cf0
Signed-off-by: Ole Troan <[email protected]>
src/vpp-api/python/vpp_papi/vpp_papi_async.py
src/vpp-api/python/vpp_papi/vpp_transport_socket.py