MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / init_modules

Function init_modules

sr_module.c:812–833  ·  view source on GitHub ↗

* Initialize all loaded modules, the initialization * is done *AFTER* the configuration file is parsed */

Source from the content-addressed store, hash-verified

810 * is done *AFTER* the configuration file is parsed
811 */
812int init_modules(void)
813{
814 struct sr_module *currentMod;
815 int ret;
816
817 if (testing_framework)
818 init_unit_tests();
819
820 /* pre-initialize all modules */
821 for (currentMod=modules; currentMod; currentMod=currentMod->next) {
822 if (currentMod->exports->preinit_f == NULL)
823 continue;
824 ret = currentMod->exports->preinit_f();
825 if (ret < 0) {
826 LM_ERR("could not pre-initialize module %s!\n",
827 currentMod->exports->name);
828 return ret;
829 }
830 }
831
832 return init_mod(modules, 0);
833}
834
835
836/* Returns 1 if the module with name 'name' is loaded, and zero otherwise. */

Callers

nothing calls this directly

Calls 2

init_unit_testsFunction · 0.85
init_modFunction · 0.85

Tested by

no test coverage detected