| 595 | } |
| 596 | |
| 597 | int __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 | |
| 617 | stat_var* __get_stat( const str *name, int mod_idx ) |
no test coverage detected