diff options
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r-- | src/vcl/vppcom.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 0bbdea54940..ce47766b5c9 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -1055,7 +1055,6 @@ vppcom_app_create (char *app_name) vcl_worker_alloc_and_init (); /* API hookup and connect to VPP */ - vppcom_api_hookup (); vcl_elog_init (vcm); vcm->app_state = STATE_APP_START; rv = vppcom_connect_to_vpp (app_name); @@ -3590,11 +3589,21 @@ vppcom_session_worker (vcl_session_handle_t session_handle) int vppcom_worker_register (void) { + vcl_worker_t *wrk; + u8 *wrk_name = 0; + int rv; + if (!vcl_worker_alloc_and_init ()) return VPPCOM_EEXIST; - if (vcl_worker_set_bapi ()) - return VPPCOM_EEXIST; + wrk = vcl_worker_get_current (); + wrk_name = format (0, "%s-wrk-%u", vcm->app_name, wrk->wrk_index); + + rv = vppcom_connect_to_vpp ((char *) wrk_name); + vec_free (wrk_name); + + if (rv) + return VPPCOM_EFAULT; if (vcl_worker_register_with_vpp ()) return VPPCOM_EEXIST; |