summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/connection.cpp
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-01-08 12:58:32 +0100
committerNeale Ranns <nranns@cisco.com>2018-01-22 20:15:36 +0000
commit18e955ea8a90b691294d71c0772770c88fadc062 (patch)
treef3213078f721af7881c979b0d296d63e792c841f /src/vpp-api/vom/connection.cpp
parent3fca567ff438145e28dd1318ad5b1734c1091257 (diff)
vom: Fix connection to VAPI and add disconnect function
Change-Id: I2dd5dbafe36e5ae536b3e600beb6920a71238b7a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/connection.cpp')
-rw-r--r--src/vpp-api/vom/connection.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/vpp-api/vom/connection.cpp b/src/vpp-api/vom/connection.cpp
index 90c02f943c4..c03ef99c172 100644
--- a/src/vpp-api/vom/connection.cpp
+++ b/src/vpp-api/vom/connection.cpp
@@ -26,7 +26,6 @@ connection::connection()
connection::~connection()
{
- disconnect();
}
void
@@ -35,16 +34,15 @@ connection::disconnect()
m_vapi_conn->disconnect();
}
-void
+int
connection::connect()
{
vapi_error_e rv;
- do {
- rv = m_vapi_conn->connect(m_app_name.c_str(),
- NULL, // m_api_prefix.c_str(),
- 128, 128);
- } while (VAPI_OK != rv);
+ rv = m_vapi_conn->connect(m_app_name.c_str(),
+ NULL, // m_api_prefix.c_str(),
+ 128, 128);
+ return rv;
}
vapi::Connection&