[SR-Dev] git:master: sl(k): register exported statistics from mod_init
Elena-Ramona Modroiu
ramona at rosdev.ro
Thu Apr 23 13:23:29 CEST 2009
Module: sip-router
Branch: master
Commit: 5019d45b6713fdfb1ab96509e0673782d889415a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5019d45b6713fdfb1ab96509e0673782d889415a
Author: Elena-Ramona Modroiu <ramona at rosdev.ro>
Committer: Elena-Ramona Modroiu <ramona at rosdev.ro>
Date: Thu Apr 23 14:17:01 2009 +0300
sl(k): register exported statistics from mod_init
- k statistics API is now in kcore library, SR core doesn't register
stats from module_exports
---
modules_k/sl/sl.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules_k/sl/sl.c b/modules_k/sl/sl.c
index eb7c93f..293246c 100644
--- a/modules_k/sl/sl.c
+++ b/modules_k/sl/sl.c
@@ -154,6 +154,17 @@ static int mod_init(void)
if (sl_enable_stats==0)
exports.stats = 0;
+#ifdef STATISTICS
+ /* register statistics */
+ if (sl_enable_stats!=0)
+ {
+ if (register_module_stats( exports.name, mod_stats)!=0 ) {
+ LM_ERR("failed to register core statistics\n");
+ return -1;
+ }
+ }
+#endif
+
/* filter all ACKs before script */
if (register_script_cb(sl_filter_ACK, PRE_SCRIPT_CB|REQ_TYPE_CB, 0 )!=0) {
LM_ERR("register_script_cb failed\n");
More information about the sr-dev
mailing list