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

Function count_module_procs

sr_module.c:865–884  ·  view source on GitHub ↗

Counts the additional the number of processes requested by modules */

Source from the content-addressed store, hash-verified

863
864/* Counts the additional the number of processes requested by modules */
865int count_module_procs(int flags)
866{
867 struct sr_module *m;
868 unsigned int cnt;
869 unsigned int n;
870
871 for( m=modules,cnt=0 ; m ; m=m->next) {
872 if (m->exports->procs==NULL)
873 continue;
874 for ( n=0 ; m->exports->procs[n].name ; n++) {
875 if (!m->exports->procs[n].no || !m->exports->procs[n].function)
876 continue;
877
878 if (!flags || (m->exports->procs[n].flags & flags))
879 cnt+=m->exports->procs[n].no;
880 }
881 }
882 LM_DBG("modules require %d extra processes\n",cnt);
883 return cnt;
884}
885
886
887int start_module_procs(void)

Callers 3

count_child_processesFunction · 0.85
mod_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected