api: multiple connections per process

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c
index f431396..b14fdee 100644
--- a/src/vcl/vcl_private.c
+++ b/src/vcl/vcl_private.c
@@ -316,7 +316,7 @@
 vcl_cleanup_bapi (void)
 {
   socket_client_main_t *scm = &socket_client_main;
-  api_main_t *am = &api_main;
+  api_main_t *am = vlibapi_get_main ();
 
   am->my_client_index = ~0;
   am->my_registration = 0;