| 758 | } |
| 759 | |
| 760 | inline static int mi_list_module_stats(mi_item_t *resp_obj, module_stats *mods) |
| 761 | { |
| 762 | stat_var *stat; |
| 763 | int ret = 0; |
| 764 | |
| 765 | if (mods->is_dyn) |
| 766 | lock_start_read((rw_lock_t *)collector->rwl); |
| 767 | |
| 768 | for( stat=mods->head ; stat ; stat=stat->lnext) { |
| 769 | if (stat_is_hidden(stat)) |
| 770 | continue; |
| 771 | ret = mi_list_stat(resp_obj, &mods->name, stat); |
| 772 | if (ret < 0) |
| 773 | break; |
| 774 | } |
| 775 | |
| 776 | if (mods->is_dyn) |
| 777 | lock_stop_read((rw_lock_t *)collector->rwl); |
| 778 | |
| 779 | return ret; |
| 780 | } |
| 781 | |
| 782 | |
| 783 | static mi_response_t *mi_get_stats(const mi_params_t *params, |
no test coverage detected