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

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

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

diff --git a/modules_k/msilo/msilo.c b/modules_k/msilo/msilo.c
index bad8f8b..3c8ffd6 100644
--- a/modules_k/msilo/msilo.c
+++ b/modules_k/msilo/msilo.c
@@ -256,6 +256,13 @@ static int mod_init(void)
 {
 	pv_spec_t avp_spec;
 
+#ifdef STATISTICS
+	/* register statistics */
+	if (register_module_stats( exports.name, msilo_stats)!=0 ) {
+		LM_ERR("failed to register core statistics\n");
+		return -1;
+	}
+#endif
 	ms_db_url.len = strlen (ms_db_url.s);
 	ms_db_table.len = strlen (ms_db_table.s);
 	sc_mid.len = strlen(sc_mid.s);




More information about the sr-dev mailing list