From 7981b901c43848d3b923ec49515b28a75ab984e3 Mon Sep 17 00:00:00 2001 From: Masoud Hemmatpour Date: Tue, 26 Nov 2019 12:05:02 +0100 Subject: [HICN-403] update vapi communication with vpp Signed-off-by: Masoud Hemmatpour Change-Id: I6e05d96af049229a6dc2da0adf32707873cdc816 Signed-off-by: Alberto Compagno --- ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c') diff --git a/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c index f044c5b1b..e028d7840 100644 --- a/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c +++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.c @@ -28,22 +28,21 @@ vapi_ctx_t g_vapi_ctx_instance=NULL; int hicn_connect_vpp() { - HICN_INVOKE_BEGIN; + if (g_vapi_ctx_instance == NULL) { vapi_error_e rv = vapi_ctx_alloc(&g_vapi_ctx_instance); rv = vapi_connect(g_vapi_ctx_instance, APP_NAME, NULL, MAX_OUTSTANDING_REQUESTS, RESPONSE_QUEUE_SIZE, VAPI_MODE_BLOCKING, true); if (rv != VAPI_OK) { - HICN_LOG_ERR("*connect %s faild,with return %d", APP_NAME, rv); + SRP_LOG_DBGMSG("Error connection"); vapi_ctx_free(g_vapi_ctx_instance); return -1; } - HICN_LOG_DBG("*connected %s ok", APP_NAME); + SRP_LOG_DBGMSG("*connected ok"); } else { - HICN_LOG_DBG("connection %s keeping", APP_NAME); + SRP_LOG_DBGMSG("connection keeping"); } - HICN_INVOKE_END; return 0; } -- cgit 1.2.3-korg