ldp: avoid calling write in destructors

Change-Id: Ia9c3d7a68a23dc4ab3be06f88fdfb053db422372
Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:
Florin Coras
2018-12-04 13:43:45 -08:00
committed by Dave Barach
parent 4af830cd7b
commit 955bfbbb69
2 changed files with 8 additions and 5 deletions

View File

@ -258,9 +258,12 @@ ldp_init (void)
rv = vppcom_app_create (ldp_get_app_name ()); rv = vppcom_app_create (ldp_get_app_name ());
if (rv != VPPCOM_OK) if (rv != VPPCOM_OK)
{ {
fprintf (stderr, "\nLDP<%d>: ERROR: ldp_init: vppcom_app_create()" ldp->vcl_needs_real_epoll = 0;
" failed! rv = %d (%s)\n", if (rv == VPPCOM_EEXIST)
getpid (), rv, vppcom_retval_str (rv)); return 0;
LDBG (2, "\nLDP<%d>: ERROR: ldp_init: vppcom_app_create()"
" failed! rv = %d (%s)\n",
getpid (), rv, vppcom_retval_str (rv));
ldp->init = 0; ldp->init = 0;
return rv; return rv;
} }

View File

@ -862,8 +862,8 @@ vppcom_app_create (char *app_name)
if (vcm->is_init) if (vcm->is_init)
{ {
clib_warning ("vcl<%u> already initialized", getpid ()); VDBG (1, "already initialized");
return -1; return VPPCOM_EEXIST;
} }
vcm->is_init = 1; vcm->is_init = 1;