summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Mikhailov (imichail) <imichail@cisco.com>2018-10-23 17:58:14 -0700
committerOle Trøan <otroan@employees.org>2018-11-05 02:34:24 +0000
commit40cca7585d969499e92b98c32956bbe3f2050e4e (patch)
tree39d9b932a6670efcc5784c43efcc49165ccb8cba
parent5efd14f75503ba5b149a9dea2400d7217d57868c (diff)
Provide return value for PAPI disconnect()
Change-Id: I209f570634636725ce8fda5f61e900a71227b888 Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_transport_shmem.py2
-rw-r--r--src/vpp-api/python/vpp_papi/vpp_transport_socket.py2
2 files changed, 3 insertions, 1 deletions
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