| 682 | } |
| 683 | |
| 684 | int 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 | |
| 701 | str *get_stat_module_name(stat_var *stat) |
no test coverage detected