From 40cca7585d969499e92b98c32956bbe3f2050e4e Mon Sep 17 00:00:00 2001 From: "Igor Mikhailov (imichail)" Date: Tue, 23 Oct 2018 17:58:14 -0700 Subject: Provide return value for PAPI disconnect() Change-Id: I209f570634636725ce8fda5f61e900a71227b888 Signed-off-by: Igor Mikhailov (imichail) --- src/vpp-api/python/vpp_papi/vpp_transport_shmem.py | 2 +- src/vpp-api/python/vpp_papi/vpp_transport_socket.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/vpp-api') diff --git a/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py b/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py index a20295b0f09..4d56e3cf00a 100644 --- a/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py +++ b/src/vpp-api/python/vpp_papi/vpp_transport_shmem.py @@ -75,7 +75,7 @@ class VppTransport: def disconnect(self): self.connected = False - vpp_api.vac_disconnect() + return vpp_api.vac_disconnect() def suspend(self): vpp_api.vac_rx_suspend() 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 5fac11f3f29..45ec4b4922e 100644 --- a/src/vpp-api/python/vpp_papi/vpp_transport_socket.py +++ b/src/vpp-api/python/vpp_papi/vpp_transport_socket.py @@ -98,6 +98,7 @@ class VppTransport: return 0 def disconnect(self): + rv = 0 try: # Might fail, if VPP closes socket before packet makes it out rv = self.parent.api.sockclnt_delete(index=self.socket_index) except IOError: @@ -106,6 +107,7 @@ class VppTransport: self.socket.close() self.sque.put(True) # Terminate listening thread self.message_thread.join() + return rv def suspend(self): pass -- cgit 1.2.3-korg