ldp: sid to fd mapper for apps with multiple workers
[vpp.git] / src / vcl / vppcom.c
index 669f04f..b397058 100644 (file)
@@ -773,7 +773,6 @@ vppcom_app_create (char *app_name)
          VERR ("couldn't connect to VPP!");
          return rv;
        }
-      vcm->main_api_client_index = vcm->my_client_index;
       VDBG (0, "sending session enable");
       rv = vppcom_app_session_enable ();
       if (rv)
@@ -3353,6 +3352,12 @@ vppcom_session_index (uint32_t session_handle)
   return session_handle & 0xFFFFFF;
 }
 
+int
+vppcom_session_handle (uint32_t session_index)
+{
+  return vcl_get_worker_index () << 24 | session_index;
+}
+
 int
 vppcom_worker_register (void)
 {