]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
explicitly call dl_init()
authorAlan T. DeKok <aland@freeradius.org>
Sun, 6 May 2018 21:32:42 +0000 (17:32 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 6 May 2018 21:32:42 +0000 (17:32 -0400)
src/include/dl.h
src/main/dl.c
src/main/radiusd.c

index e2a2d37c2047f07f2f8fb9b492eae67abb98b304..eaace2bdf4565b466d2daa8eea70411f07833b4e 100644 (file)
@@ -166,6 +166,8 @@ struct dl_instance {
 #define DL_INSTANTIATE_PRIORITY        5               //!< Callback priority for bootstrap callback
 
 
+int                    dl_init(void);
+
 int                    dl_symbol_init_cb_register(unsigned int priority, char const *symbol,
                                                   dl_init_t func, void *ctx);
 
index cf5588bf09fe6e24c80166f7afa05897cd1ce284..c55ad7b44a6e43daf52a45e837d8c28b0207f243 100644 (file)
@@ -119,8 +119,6 @@ static FR_NAME_NUMBER const dl_type_prefix[] = {
        {  NULL , -1 },
 };
 
-static int dl_init(void);
-
 static int dl_symbol_init_cmp(void const *one, void const *two)
 {
        dl_symbol_init_t const *a = one, *b = two;
@@ -684,8 +682,6 @@ dl_t const *dl_module(CONF_SECTION *conf, dl_t const *parent, char const *name,
        char                    *p, *q;
        dl_common_t const       *module;
 
-       if (!dl) dl_init();
-
        if (parent) {
                module_name = talloc_typed_asprintf(NULL, "%s_%s_%s",
                                                    fr_int2str(dl_type_prefix, parent->type, "<INVALID>"),
@@ -894,7 +890,7 @@ int dl_instance(TALLOC_CTX *ctx, dl_instance_t **out,
 /** Initialise structures needed by the dynamic linker
  *
  */
-static int dl_init(void)
+int dl_init(void)
 {
        if (dl) return 0;
 
index 15945220ce64cd416d3ed821d62e8dd7fc147076..c588367caf842bb1ba6dc823f99edc8af7c7a13c 100644 (file)
@@ -395,6 +395,12 @@ int main(int argc, char *argv[])
         */
        if (main_config.daemonize) main_config.write_pid = true;
 
+       /*
+        *      Initialize the DL infrastructure, which is used by the
+        *      config file parser.
+        */
+       dl_init();
+
        /*
         *  Read the configuration files, BEFORE doing anything else.
         */