#include <epan/tap.h>
#include <epan/stat_cmd_args.h>
#include "epan/value_string.h"
-#include "register.h"
#include <epan/dissectors/packet-h225.h>
/* following values represent the size of their valuestring arrays */
default:
return 0;
- break;
}
return 1;
printf(" %s : %u\n", val_to_str(j,LocationRejectReason_vals,"unknown reason "), hs->lrj_reason[j]);
}
}
+ break;
case 29: /* IRQNak */
for(j=0;j<=IRQNAK_REASONS;j++) {
if(hs->irqnak_reason[j]!=0) {
h225counter_init(const char *optarg, void* userdata _U_)
{
h225counter_t *hs;
- const char *filter=NULL;
GString *error_string;
+ hs = g_malloc(sizeof(h225counter_t));
if(!strncmp(optarg,"h225,counter,",13)){
- filter=optarg+13;
+ hs->filter=g_strdup(optarg+13);
} else {
- filter="";
+ hs->filter=NULL;
}
- hs = g_malloc(sizeof(h225counter_t));
- hs->filter=g_strdup(filter);
-
h225counter_reset(hs);
- error_string=register_tap_listener("h225", hs, filter, NULL, h225counter_packet, h225counter_draw);
+ error_string=register_tap_listener("h225", hs, hs->filter, 0, NULL, h225counter_packet, h225counter_draw);
if(error_string){
/* error, we failed to attach to the tap. clean up */
g_free(hs->filter);