MEM(sym_name = talloc_typed_asprintf(NULL, "%s_%s", dl_module->name, init->symbol));
sym = dlsym(dl_module->handle, sym_name);
+ if (!sym) {
+ DEBUG4("Symbol %s not found", sym_name);
+ talloc_free(sym_name);
+ continue;
+ }
+ DEBUG3("Symbol %s found at %p", sym_name, sym);
talloc_free(sym_name);
-
- if (!sym) continue;
}
if (init->func(dl_module, sym, init->ctx) < 0) return -1;
if (!dl) dl_init();
if (parent) {
- to_find.name = module_name = talloc_typed_asprintf(NULL, "%s_%s_%s",
- fr_int2str(dl_type_prefix, parent->type, "<INVALID>"),
- parent->common->name, name);
+ module_name = talloc_typed_asprintf(NULL, "%s_%s_%s",
+ fr_int2str(dl_type_prefix, parent->type, "<INVALID>"),
+ parent->common->name, name);
} else {
- to_find.name = module_name = talloc_typed_asprintf(NULL, "%s_%s",
- fr_int2str(dl_type_prefix, type, "<INVALID>"),
- name);
+ module_name = talloc_typed_asprintf(NULL, "%s_%s",
+ fr_int2str(dl_type_prefix, type, "<INVALID>"),
+ name);
}
+ to_find.name = module_name;
for (p = module_name, q = p + talloc_array_length(p) - 1; p < q; p++) *p = tolower(*p);