Make infiniband plugin compile.
[obnox/wireshark/wip.git] / tap-camelcounter.c
index b5ab177d15ee68b8b5c264df3d4ab9f75c97646c..1989deeb421443bc4516dc4b6769b8741ed4f2c5 100644 (file)
@@ -1,6 +1,9 @@
 /* tap_camelcounter.c
  * camel message counter for tshark
  * Copyright 2006 Florent DROUIN
+ *
+ * $Id$
+ *
  * This part of code is extracted from tap-h225counter.c from Lars Roland
  *
  * Wireshark - Network traffic analyzer
 #endif
 
 #include <string.h>
+#include "epan/packet.h"
 #include "epan/packet_info.h"
 #include "epan/tap.h"
 #include "epan/value_string.h"
 #include "register.h"
 #include "epan/stat_cmd_args.h"
+#include "epan/asn1.h"
 #include "epan/camel-persistentdata.h"
 
 void register_tap_listener_camelcounter(void);
@@ -102,8 +107,7 @@ static void camelcounter_init(const char *optarg, void* userdata _U_)
 
   p_camelcounter = g_malloc(sizeof(struct camelcounter_t));
   if(filter){
-    p_camelcounter->filter=g_malloc(strlen(filter)+1);
-    strcpy(p_camelcounter->filter,filter);
+    p_camelcounter->filter=g_strdup(filter);
   } else {
     p_camelcounter->filter=NULL;
   }