Skip to content

Commit

Permalink
Print _WHICH_ initialiser failed
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Sep 4, 2023
1 parent 658b61b commit 71f5e7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/server/dl_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ dl_module_t const *dl_module(dl_module_t const *parent, char const *name, dl_mod
DEBUG3("%s validated. Handle address %p, symbol address %p", module_name, dl, common);

if (dl_symbol_init(dl_module_loader->dl_loader, dl) < 0) {
ERROR("Failed calling initializers for module \"%s\"", module_name);
PERROR("Failed calling initializers for module \"%s\"", module_name);
goto error;
}

Expand Down
5 changes: 4 additions & 1 deletion src/lib/util/dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ int dl_symbol_init(dl_loader_t *dl_loader, dl_t const *dl)
}
}

if (init->func(dl, sym, init->uctx) < 0) return -1;
if (init->func(dl, sym, init->uctx) < 0) {
fr_strerror_printf("Iinitialiser \"%s\" failed", buffer);
return -1;
}
}

return 0;
Expand Down

0 comments on commit 71f5e7e

Please sign in to comment.