Make infiniband plugin compile.
[obnox/wireshark/wip.git] / tap-camelcounter.c
index 8cb7558a75ca35e4b96b5c6addc3f7769e77034e..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
@@ -33,6 +36,7 @@
 #endif
 
 #include <string.h>
+#include "epan/packet.h"
 #include "epan/packet_info.h"
 #include "epan/tap.h"
 #include "epan/value_string.h"
@@ -103,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;
   }