X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=tap-megacostat.c;h=6e5186c688ea93b67c1dd632f3e211bdee56c5f9;hb=2ecedb33265031dc81ee86e18c3b2450b97d57db;hp=5e2b3c5d36682527315cb3e583512271b4c42651;hpb=fdaebbf4975f970f7dce82341920c20ad6098e0f;p=obnox%2Fwireshark%2Fwip.git diff --git a/tap-megacostat.c b/tap-megacostat.c index 5e2b3c5d36..6e5186c688 100644 --- a/tap-megacostat.c +++ b/tap-megacostat.c @@ -39,7 +39,6 @@ #include #include #include "epan/value_string.h" -#include "register.h" #include "epan/gcp.h" #include "timestats.h" #include @@ -85,15 +84,21 @@ megacostat_init(const char *optarg, void* userdata _U_) int i; 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 || !h248_ctx_track) { + /* No such preferences */ + return; + } + 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 response times.\n"); exit(1); } - + ms=g_malloc(sizeof(megacostat_t)); if(!strncmp(optarg,"megaco,rtd,",11)){ ms->filter=g_strdup(optarg+11);