Browse files

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.


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

when the actual error was

dlerror: .../lib/libvmod_debug/.libs/ undefined symbol:...
  • Loading branch information...
nigoroll committed Oct 12, 2017
1 parent 8e9eb0f commit f683585753ec8ceb2f82eb4fcbf5b51bbbca3b2d
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/libvcc/vcc_vmod.c
@@ -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);

0 comments on commit f683585

Please sign in to comment.