aboutsummaryrefslogtreecommitdiffstats
path: root/tap-megacostat.c
diff options
context:
space:
mode:
authorBalint Reczey <balint.reczey@ericsson.com>2009-01-06 14:42:20 +0000
committerBalint Reczey <balint.reczey@ericsson.com>2009-01-06 14:42:20 +0000
commit8022776680b476b3efc7602ce069a4de9087f5ef (patch)
tree0e408ab36a2d632accee7b2b2d75699d645a98fb /tap-megacostat.c
parent5c7253a68102b0c4522523e88d0500803eab1f0f (diff)
Disable MEGACO service response time statistics when context tracking is disabled.
svn path=/trunk/; revision=27167
Diffstat (limited to 'tap-megacostat.c')
-rw-r--r--tap-megacostat.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tap-megacostat.c b/tap-megacostat.c
index efd431ab4f..dfe9fdb92c 100644
--- a/tap-megacostat.c
+++ b/tap-megacostat.c
@@ -42,6 +42,7 @@
#include "register.h"
#include "epan/gcp.h"
#include "timestats.h"
+#include <epan/prefs-int.h>
#include "tap-megaco-common.h"
@@ -84,7 +85,16 @@ megacostat_init(const char *optarg, void* userdata _U_)
int i;
const char *filter=NULL;
GString *error_string;
-
+ pref_t *megaco_ctx_track,*h248_ctx_track;
+
+ megaco_ctx_track = prefs_find_preference(prefs_find_module("megaco"),"ctx_info");
+ h248_ctx_track = prefs_find_preference(prefs_find_module("h248"),"ctx_info");
+ if (!*megaco_ctx_track->varp.boolp || !*h248_ctx_track->varp.boolp) {
+ printf("Track Context option at Protocols -> MEGACO and Protocols -> H248 preferences\n");
+ printf("has to be set to true to enable measurement of service reponse times.\n");
+ exit(1);
+ }
+
if(!strncmp(optarg,"megaco,rtd,",11)){
filter=optarg+11;
} else {