summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vat/plugin.c9
-rw-r--r--src/vlib/unix/plugin.c2
-rw-r--r--src/vpp/api/plugin.c8
3 files changed, 14 insertions, 5 deletions
diff --git a/src/vat/plugin.c b/src/vat/plugin.c
index 20de8c50b6f..b94c4fc30d0 100644
--- a/src/vat/plugin.c
+++ b/src/vat/plugin.c
@@ -40,14 +40,19 @@ load_one_plugin (plugin_main_t * pm, plugin_info_t * pi)
if (handle == 0)
{
clib_warning ("%s", dlerror ());
- return -1;
+ return 0;
}
pi->handle = handle;
register_handle = dlsym (pi->handle, "vat_plugin_register");
if (register_handle == 0)
- return 0;
+ {
+ clib_warning ("%s: symbol vat_plugin_register not found", pi->name);
+ dlclose (handle);
+ return 0;
+ }
+
fp = register_handle;
diff --git a/src/vlib/unix/plugin.c b/src/vlib/unix/plugin.c
index 058afcfcae0..a1df3b24b66 100644
--- a/src/vlib/unix/plugin.c
+++ b/src/vlib/unix/plugin.c
@@ -141,7 +141,7 @@ load_one_plugin (plugin_main_t * pm, plugin_info_t * pi, int from_early_init)
{
clib_warning ("%s", dlerror ());
clib_warning ("Failed to load plugin '%s'", pi->name);
- os_exit (1);
+ goto error;
}
pi->handle = handle;
diff --git a/src/vpp/api/plugin.c b/src/vpp/api/plugin.c
index e8b134173d8..95bdbe6cd7e 100644
--- a/src/vpp/api/plugin.c
+++ b/src/vpp/api/plugin.c
@@ -40,14 +40,18 @@ load_one_plugin (plugin_main_t * pm, plugin_info_t * pi)
if (handle == 0)
{
clib_warning ("%s", dlerror ());
- return -1;
+ return 0;
}
pi->handle = handle;
register_handle = dlsym (pi->handle, "vat_plugin_register");
if (register_handle == 0)
- return 0;
+ {
+ clib_warning ("%s: symbol vat_plugin_register not found", pi->name);
+ dlclose (handle);
+ return 0;
+ }
fp = register_handle;