Commit f6835857 authored by Nils Goroll's avatar Nils Goroll

exit VFIL_searchpath upon dlopen error

Together with the previous commit, this fixes potentially misleading
error messages.

Because we called vcc_path_dlopen on all vmod_path elements
irrespective of the kind of dlopen() error, the actual root cause
could be hidden.

Example:

dlerror: .../lib/libvmod_blob/.libs/libvmod_debug.so: cannot open shared object file

when the actual error was

dlerror: .../lib/libvmod_debug/.libs/libvmod_debug.so: undefined symbol:...
parent 8e9eb0ff
......@@ -48,7 +48,7 @@ vcc_path_dlopen(void *priv, const char *fn)
hdl = dlopen(fn, RTLD_NOW | RTLD_LOCAL);
if (hdl == NULL)
return (1);
return (-1);
pp = priv;
*pp = hdl;
return (0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment