diff options
author | Florin Coras <fcoras@cisco.com> | 2018-12-04 13:43:45 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2018-12-05 15:37:13 +0000 |
commit | 955bfbbb6968bdc99171bdebcda6dbe605af2004 (patch) | |
tree | fd20134aa69a7e644466c29d37a1514d73a6c00b /src/vcl | |
parent | 4af830cd7b4a11bb84840183f7eebd6fb43497a6 (diff) |
ldp: avoid calling write in destructors
Change-Id: Ia9c3d7a68a23dc4ab3be06f88fdfb053db422372
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl')
-rw-r--r-- | src/vcl/ldp.c | 9 | ||||
-rw-r--r-- | src/vcl/vppcom.c | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c index 453ddeb3340..c3dc64a4d3b 100644 --- a/src/vcl/ldp.c +++ b/src/vcl/ldp.c @@ -258,9 +258,12 @@ ldp_init (void) rv = vppcom_app_create (ldp_get_app_name ()); if (rv != VPPCOM_OK) { - fprintf (stderr, "\nLDP<%d>: ERROR: ldp_init: vppcom_app_create()" - " failed! rv = %d (%s)\n", - getpid (), rv, vppcom_retval_str (rv)); + ldp->vcl_needs_real_epoll = 0; + if (rv == VPPCOM_EEXIST) + 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; return rv; } diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 07136e9c6c8..dbb0d657b8d 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -862,8 +862,8 @@ vppcom_app_create (char *app_name) if (vcm->is_init) { - clib_warning ("vcl<%u> already initialized", getpid ()); - return -1; + VDBG (1, "already initialized"); + return VPPCOM_EEXIST; } vcm->is_init = 1; |