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

Function mi_print_stat

statistics.c:684–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682}
683
684int mi_print_stat(mi_item_t *resp_obj, str *mod, str *stat, unsigned long val)
685{
686 str tmp_buf;
687
688 if (mi_stat_name(mod, stat, &tmp_buf) < 0) {
689 LM_ERR("cannot get stat name\n");
690 return -1;
691 }
692
693 if (add_mi_number(resp_obj, tmp_buf.s, tmp_buf.len, val) < 0) {
694 LM_ERR("cannot add stat\n");
695 return -1;
696 }
697 return 0;
698}
699
700
701str *get_stat_module_name(stat_var *stat)

Callers 2

mi_add_statFunction · 0.85
mi_add_module_statsFunction · 0.85

Calls 2

mi_stat_nameFunction · 0.85
add_mi_numberFunction · 0.85

Tested by

no test coverage detected