return dl_module_l->dl_loader;
}
+/** Wrapper to log errors
+ */
+static int dl_dict_enum_autoload(dl_t const *module, void *symbol, void *user_ctx)
+{
+ int ret;
+
+ ret = fr_dl_dict_enum_autoload(module, symbol, user_ctx);
+ if (ret < 0) PERROR("Failed autoloading enum value for \"%s\"", module->name);
+
+ return ret;
+}
+
+/** Wrapper to log errors
+ */
+static int dl_dict_attr_autoload(dl_t const *module, void *symbol, void *user_ctx)
+{
+ int ret;
+
+ ret = fr_dl_dict_attr_autoload(module, symbol, user_ctx);
+ if (ret < 0) PERROR("Failed autoloading attribute for \"%s\"", module->name);
+
+ return ret;
+}
+
+/** Wrapper to log errors
+ */
+static int dl_dict_autoload(dl_t const *module, void *symbol, void *user_ctx)
+{
+ int ret;
+
+ ret = fr_dl_dict_autoload(module, symbol, user_ctx);
+ if (ret < 0) PERROR("Failed autoloading dictionary for \"%s\"", module->name);
+
+ return ret;
+}
+
/** Initialise structures needed by the dynamic linker
*
*/
* Register dictionary autoload callbacks
*/
dl_symbol_init_cb_register(dl_module_loader->dl_loader,
- DL_PRIORITY_DICT_ENUM, "dict_enum", fr_dl_dict_enum_autoload, NULL);
+ DL_PRIORITY_DICT_ENUM, "dict_enum", dl_dict_enum_autoload, NULL);
dl_symbol_init_cb_register(dl_module_loader->dl_loader,
- DL_PRIORITY_DICT_ATTR, "dict_attr", fr_dl_dict_attr_autoload, NULL);
+ DL_PRIORITY_DICT_ATTR, "dict_attr", dl_dict_attr_autoload, NULL);
dl_symbol_init_cb_register(dl_module_loader->dl_loader,
- DL_PRIORITY_DICT, "dict", fr_dl_dict_autoload, NULL);
+ DL_PRIORITY_DICT, "dict", dl_dict_autoload, NULL);
dl_symbol_free_cb_register(dl_module_loader->dl_loader,
DL_PRIORITY_DICT, "dict", fr_dl_dict_autofree, NULL);
for (p = to_load; p->out; p++) {
if (unlikely(!p->attr)) {
- fr_strerror_const("Invalid autoload entry, missing attribute pointer");
+ fr_strerror_printf("Invalid attribute autoload entry for \"%s\", missing attribute pointer", p->name);
return -1;
}
if (unlikely(!*p->attr)) {
- fr_strerror_printf("Can't resolve value '%s', attribute not loaded", p->name);
+ fr_strerror_printf("Can't resolve value \"%s\", attribute not loaded", p->name);
fr_strerror_printf_push("Check fr_dict_attr_autoload_t struct has "
"an entry to load the attribute \"%s\" is located in, and that "
"the fr_dict_autoload_attr_t symbol name is correct", p->name);
for (p = to_load; p->out; p++) {
if (!p->dict) {
- fr_strerror_const("Invalid autoload entry, missing dictionary pointer");
+ fr_strerror_printf("Invalid attribute autoload entry for \"%s\", missing dictionary pointer", p->name);
return -1;
}