Module: sip-router
Branch: master
Commit: 53fb4b2bc0c8983a0df6d04dcaf790a8f438aa91
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=53fb4b2…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Aug 26 21:29:28 2010 +0200
sst(k): don't register statistics twice
Include kstats_wraper.h and don't register statistics twice (both
form mod_init() and via the module exports structure).
---
modules_k/sst/sst.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules_k/sst/sst.c b/modules_k/sst/sst.c
index 1c162b7..f7c65a8 100644
--- a/modules_k/sst/sst.c
+++ b/modules_k/sst/sst.c
@@ -50,6 +50,9 @@
#include "../../modules/sl/sl.h"
#include "sst_handlers.h" /* also includes sr_module.h needed by
handlers */
+#ifdef STATISTICS
+#include "../../lib/kcore/kstats_wrapper.h"
+#endif
MODULE_VERSION
@@ -118,6 +121,7 @@ static param_export_t mod_params[]={
{ 0,0,0 }
};
+#ifdef STATISTICS
/*
* Export the statistics we have
*/
@@ -125,13 +129,14 @@ static stat_export_t mod_stats[] = {
{"expired_sst", 0, &expired_sst},
{0,0,0}
};
+#endif /* STATISTICS */
struct module_exports exports= {
"sst", /* module's name */
DEFAULT_DLFLAGS, /* dlopen flags */
cmds, /* exported functions */
mod_params, /* param exports */
- mod_stats, /* exported statistics */
+ 0, /* exported statistics (they are registered from mod_init) */
0, /* exported MI functions */
0, /* exported pseudo-variables */
0, /* extra processes */