Revert stupid RTLD_NOLOAD change that breaks module loading on some systems.
authorMatthew Fredrickson <creslin@digium.com>
Thu, 24 Aug 2006 17:24:33 +0000 (17:24 +0000)
committerMatthew Fredrickson <creslin@digium.com>
Thu, 24 Aug 2006 17:24:33 +0000 (17:24 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40981 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/loader.c

index a4cf7a8..681f5ed 100644 (file)
@@ -387,14 +387,6 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned
           on the already-opened library to what we want... if not, we have to
           close it and start over
        */
-#if HAVE_RTLD_NOLOAD
-       if (!dlopen(fn, RTLD_NOLOAD | (wants_global ? RTLD_GLOBAL : RTLD_NOW))) {
-               ast_log(LOG_WARNING, "%s\n", dlerror());
-               while (!dlclose(lib));
-               free(resource_being_loaded);
-               return NULL;
-       }
-#else
        while (!dlclose(lib));
        resource_being_loaded = NULL;
 
@@ -414,7 +406,6 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned
        /* since the module was successfully opened, and it registered itself
           the previous time we did that, we're going to assume it worked this
           time too :) */
-#endif
 
        AST_LIST_LAST(&module_list)->lib = lib;
        resource_being_loaded = NULL;