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

Function __register_module_stats

statistics.c:597–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595}
596
597int __register_module_stats(const char *module, const stat_export_t *stats, int unsafe)
598{
599 int ret;
600
601 if (module==0 || module[0]==0 || !stats || !stats[0].name)
602 return 0;
603
604 for( ; stats->name ; stats++) {
605 ret = register_stat2( module, stats->name, stats->stat_pointer,
606 stats->flags, NULL, unsafe);
607 if (ret!=0) {
608 LM_CRIT("failed to add statistic\n");
609 return -1;
610 }
611 }
612
613 return 0;
614}
615
616
617stat_var* __get_stat( const str *name, int mod_idx )

Callers 1

init_stats_collectorFunction · 0.85

Calls 1

register_stat2Function · 0.85

Tested by

no test coverage detected