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

Function register_stats_group

statistics.c:1017–1034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1015}
1016
1017group_stats *register_stats_group(const char *name)
1018{
1019 group_stats *grp = shm_malloc(sizeof *grp);
1020 if (!grp)
1021 return NULL;
1022 memset(grp, 0, sizeof *grp);
1023 init_str(&grp->name, name);
1024 grp->vars = shm_malloc(sizeof(stat_var *));
1025 if (!grp->vars) {
1026 shm_free(grp);
1027 return NULL;
1028 }
1029
1030 grp->next = collector->groups;
1031 collector->groups = grp;
1032
1033 return grp;
1034}
1035
1036int add_stats_group(group_stats *grp, stat_var *stat)
1037{

Callers 2

init_pkg_statsFunction · 0.85

Calls 3

shm_mallocFunction · 0.85
init_strFunction · 0.85
shm_freeFunction · 0.85

Tested by

no test coverage detected