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

Function destroy_module

sr_module.c:624–647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622
623
624static void destroy_module(struct sr_module *m, int skip_others)
625{
626 struct sr_module_dep *dep;
627
628 if (!m)
629 return;
630
631 /* destroy the modules in script load order using backwards iteration */
632 if (!skip_others)
633 destroy_module(m->next, 0);
634
635 if (m->destroy_done || !m->exports)
636 return;
637
638 /* make sure certain modules get destroyed before this one */
639 for (dep = m->sr_deps_destroy; dep; dep = dep->next)
640 if (!dep->mod->destroy_done)
641 destroy_module(dep->mod, 1);
642
643 if (m->init_done && m->exports->destroy_f)
644 m->exports->destroy_f();
645
646 m->destroy_done = 1;
647}
648
649
650void destroy_modules(void)

Callers 1

destroy_modulesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected