From: Arran Cudbard-Bell Date: Mon, 30 Apr 2018 09:23:53 +0000 (+1200) Subject: Show which symbols we're checking for on autoload X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=053b091a237c8d0b96ff4a3bcccefa410cc51841;p=thirdparty%2Ffreeradius-server.git Show which symbols we're checking for on autoload --- diff --git a/src/main/dl.c b/src/main/dl.c index f1d26b49c2c..cf5588bf09f 100644 --- a/src/main/dl.c +++ b/src/main/dl.c @@ -293,9 +293,13 @@ static int dl_symbol_init_walk(dl_t const *dl_module) 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; @@ -683,14 +687,15 @@ dl_t const *dl_module(CONF_SECTION *conf, dl_t const *parent, char const *name, 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, ""), - parent->common->name, name); + module_name = talloc_typed_asprintf(NULL, "%s_%s_%s", + fr_int2str(dl_type_prefix, parent->type, ""), + parent->common->name, name); } else { - to_find.name = module_name = talloc_typed_asprintf(NULL, "%s_%s", - fr_int2str(dl_type_prefix, type, ""), - name); + module_name = talloc_typed_asprintf(NULL, "%s_%s", + fr_int2str(dl_type_prefix, type, ""), + name); } + to_find.name = module_name; for (p = module_name, q = p + talloc_array_length(p) - 1; p < q; p++) *p = tolower(*p);