modules: clear module list and mod paths in init
If main is called more than once (like in tests), everything is reinitialized except the loaded module list and module paths, so clear them too so that modules are loaded again and the path list is correct.
This commit is contained in:
parent
c33da0d24e
commit
7a2ccb077f
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ init_modules(void)
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
memset(&module_list, 0, sizeof(module_list));
|
||||
memset(&mod_paths, 0, sizeof(mod_paths));
|
||||
|
||||
/* Add the default paths we look in to the module system --nenolod */
|
||||
mod_add_path(ircd_paths[IRCD_PATH_MODULES]);
|
||||
mod_add_path(ircd_paths[IRCD_PATH_AUTOLOAD_MODULES]);
|
||||
|
|
Loading…
Reference in a new issue