[SR-Dev] git:master: imc(k): register exported statistics from mod_init

Elena-Ramona Modroiu ramona at rosdev.ro
Thu Apr 23 13:23:28 CEST 2009


Module: sip-router
Branch: master
Commit: 755c3f6dc84a664321ad34eeedc55a5b27fd23ce
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=755c3f6dc84a664321ad34eeedc55a5b27fd23ce

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

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

diff --git a/modules_k/imc/imc.c b/modules_k/imc/imc.c
index d7354ac..687733f 100644
--- a/modules_k/imc/imc.c
+++ b/modules_k/imc/imc.c
@@ -336,6 +336,14 @@ error:
 
 static int mod_init(void)
 {
+#ifdef STATISTICS
+	/* register statistics */
+	if (register_module_stats( exports.name, imc_stats)!=0 ) {
+		LM_ERR("failed to register core statistics\n");
+		return -1;
+	}
+#endif
+	
 	if(register_mi_mod(exports.name, mi_cmds)!=0)
 	{
 		LM_ERR("failed to register MI commands\n");




More information about the sr-dev mailing list