forked from osmocom/wireshark
Disable MEGACO service response time statistics when context tracking is disabled.
svn path=/trunk/; revision=27167
This commit is contained in:
parent
5c7253a681
commit
8022776680
|
@ -42,6 +42,7 @@
|
|||
#include <epan/value_string.h>
|
||||
#include <epan/tap.h>
|
||||
#include "epan/gcp.h"
|
||||
#include <epan/prefs-int.h>
|
||||
|
||||
#include "../register.h"
|
||||
#include "../timestats.h"
|
||||
|
@ -153,7 +154,16 @@ gtk_megacostat_init(const char *optarg, void *userdata _U_)
|
|||
GString *error_string;
|
||||
GtkWidget *bt_close;
|
||||
GtkWidget *bbox;
|
||||
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) {
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", "Track Context option at Protocols -> MEGACO and Protocols -> H248 preferences has to be set to true to enable measurement of service reponse times.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(strncmp(optarg,"megaco,srt,",11) == 0){
|
||||
filter=optarg+11;
|
||||
} else {
|
||||
|
|
|
@ -119,7 +119,13 @@ megacostat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
switch (mi->type) {
|
||||
|
||||
GCP_CMD_REQ_CASE
|
||||
if(mi->trx->initial->framenum != mi->msg->framenum){
|
||||
if(!mi->trx->initial) {
|
||||
/* Track Context is probably disabled, we cannot
|
||||
* measure service response time */
|
||||
return 0;
|
||||
}
|
||||
|
||||
else if(mi->trx->initial->framenum != mi->msg->framenum){
|
||||
/* Duplicate is ignored */
|
||||
ms->req_dup_num++;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue