[SR-Dev] git:master: registrar(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: 93154d273d234a2958a364faa8fcfe546daf5c28
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=93154d273d234a2958a364faa8fcfe546daf5c28

Author: Elena-Ramona Modroiu <ramona at rosdev.ro>
Committer: Elena-Ramona Modroiu <ramona at rosdev.ro>
Date:   Thu Apr 23 13:50:34 2009 +0300

registrar(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/registrar/reg_mod.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/modules_k/registrar/reg_mod.c b/modules_k/registrar/reg_mod.c
index 5986867..f80d901 100644
--- a/modules_k/registrar/reg_mod.c
+++ b/modules_k/registrar/reg_mod.c
@@ -249,6 +249,15 @@ static int mod_init(void)
 	str s;
 	bind_usrloc_t bind_usrloc;
 
+
+#ifdef STATISTICS
+	/* register statistics */
+	if (register_module_stats( exports.name, mod_stats)!=0 ) {
+		LM_ERR("failed to register core statistics\n");
+		return -1;
+	}
+#endif
+
 	/* load the SL API */
 	if (load_sl_api(&slb)!=0) {
 		LM_ERR("can't load SL API\n");




More information about the sr-dev mailing list