diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-07-17 18:19:21 +0200 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-07-17 18:19:21 +0200 |
commit | ac16674af88636b6016cd90d15d7f6887a1c8b19 (patch) | |
tree | acaad3407dd7156673bd998d47e043b63dc29580 /libtransport | |
parent | a621d4843592cdf3fe758fc06ab19af299278ca7 (diff) |
[HICN-246] Initializing vpp_api state only the first time a socket is created.
Change-Id: I1e56f2b65374777f72f2b264a417a213ad0d0320
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'libtransport')
-rw-r--r-- | libtransport/src/hicn/transport/core/vpp_forwarder_interface.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libtransport/src/hicn/transport/core/vpp_forwarder_interface.cc b/libtransport/src/hicn/transport/core/vpp_forwarder_interface.cc index 303b753be..61c5dfc7f 100644 --- a/libtransport/src/hicn/transport/core/vpp_forwarder_interface.cc +++ b/libtransport/src/hicn/transport/core/vpp_forwarder_interface.cc @@ -125,15 +125,14 @@ void VPPForwarderInterface::connect(bool is_consumer) { if (!VPPForwarderInterface::memif_api_) { VPPForwarderInterface::api_ = vpp_binary_api_init(app_name.str().c_str()); - } - - VPPForwarderInterface::memif_api_ = + VPPForwarderInterface::memif_api_ = memif_binary_api_init(VPPForwarderInterface::api_); + VPPForwarderInterface::hicn_api_ = + hicn_binary_api_init(VPPForwarderInterface::api_); + } sw_if_index_ = getMemifConfiguration(); - VPPForwarderInterface::hicn_api_ = - hicn_binary_api_init(VPPForwarderInterface::api_); if (is_consumer) { consumerConnection(); } |