mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Merged revisions 183241 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183241 | russell | 2009-03-19 12:52:52 -0500 (Thu, 19 Mar 2009) | 2 lines Remove the use of RTLD_NOLOAD, as it is not behaving like expected. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -403,18 +403,6 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* if the system supports RTLD_NOLOAD, we can just 'promote' the flags
|
||||
on the already-opened library to what we want... if not, we have to
|
||||
close it and start over
|
||||
*/
|
||||
#if defined(HAVE_RTLD_NOLOAD) && !defined(__Darwin__)
|
||||
if (!dlopen(fn, RTLD_NOLOAD | (wants_global ? RTLD_LAZY | RTLD_GLOBAL : RTLD_NOW | RTLD_LOCAL))) {
|
||||
ast_log(LOG_WARNING, "Unable to promote flags on module '%s': %s\n", resource_in, dlerror());
|
||||
while (!dlclose(lib));
|
||||
ast_free(resource_being_loaded);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
while (!dlclose(lib));
|
||||
resource_being_loaded = NULL;
|
||||
|
||||
@@ -435,7 +423,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;
|
||||
|
Reference in New Issue
Block a user