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

Author: Elena-Ramona Modroiu <ramona at rosdev.ro>
Committer: Elena-Ramona Modroiu <ramona at rosdev.ro>
Date:   Thu Apr 23 14:19:03 2009 +0300

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

diff --git a/modules_k/sst/sst.c b/modules_k/sst/sst.c
index 6545ae3..33a6d60 100644
--- a/modules_k/sst/sst.c
+++ b/modules_k/sst/sst.c
@@ -159,6 +159,18 @@ static int mod_init(void)
 		exports.stats = 0;
 	}
 
+#ifdef STATISTICS
+	/* register statistics */
+	if (sst_enable_stats!=0)
+	{
+		if (register_module_stats( exports.name, mod_stats)!=0 ) {
+			LM_ERR("failed to register core statistics\n");
+			return -1;
+		}
+	}
+#endif
+
+
 	if (sst_flag == -1) {
 		LM_ERR("no sst flag set!!\n");
 		return -1;




More information about the sr-dev mailing list