From a37810dcf4bf3028992abc249bf1f8e96e24a678 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Wed, 26 Jun 2019 17:24:56 +0200 Subject: papi: prevent message_table inconsistencies Socket transport is maintaining message_table to map message name to index. After disconnect and re-connect, the VPP may have been restarted with different set of plugins, so message_table has to be wiped. + Edited MAINTAINERS to recognize "papi" as a separate component. Type: fix Change-Id: I1f16ad7ee0886e03bbc6a17bcddbfcaa322354e5 Signed-off-by: Vratko Polak --- src/vpp-api/python/vpp_papi/vpp_transport_socket.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/vpp-api/python/vpp_papi/vpp_transport_socket.py b/src/vpp-api/python/vpp_papi/vpp_transport_socket.py index ee142584c86..6c06791959d 100644 --- a/src/vpp-api/python/vpp_papi/vpp_transport_socket.py +++ b/src/vpp-api/python/vpp_papi/vpp_transport_socket.py @@ -152,6 +152,8 @@ class VppTransport(object): if self.message_thread is not None and self.message_thread.is_alive(): # Allow additional connect() calls. self.message_thread.join() + # Wipe message table, VPP can be restarted with different plugins. + self.message_table = {} # Collect garbage. self.message_thread = None self.socket = None -- cgit 1.2.3-korg