modules: quietly succeed at loading a module if already loaded
This allows explicitly loading a module in the config so it's available for later config items that might need it, and skips the double load when main loads all modules, which would cause errors
This commit is contained in:
parent
7a2ccb077f
commit
cc95a6722e
1 changed files with 4 additions and 0 deletions
|
@ -465,6 +465,10 @@ load_a_module(const char *path, bool warn, int origin, bool core)
|
|||
if((c = rb_strcasestr(mod_displayname, LT_MODULE_EXT)) != NULL)
|
||||
*c = '\0';
|
||||
|
||||
/* Quietly succeed if the module is already loaded */
|
||||
if(findmodule_byname(mod_displayname) != NULL)
|
||||
return true;
|
||||
|
||||
tmpptr = lt_dlopenext(path);
|
||||
|
||||
if(tmpptr == NULL)
|
||||
|
|
Loading…
Reference in a new issue