packet-smb-direct: register as a infiniband subdissector
[metze/wireshark/wip.git] / capture_sync.c
index 252e5e99c2afc6557c91ad9a5570bb231ee2de47..01717e673439e24e41011eaf1a03b8338d5ebd54 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <glib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <ctype.h>
 #include <string.h>
 
@@ -84,7 +85,6 @@
 
 #include "globals.h"
 #include "file.h"
-#include <epan/filesystem.h>
 
 #include "capture.h"
 #include "capture_sync.h"
@@ -97,6 +97,7 @@
 
 #include "ui/ui_util.h"
 
+#include <wsutil/filesystem.h>
 #include <wsutil/file_util.h>
 #include <wsutil/report_err.h>
 #include "log.h"
@@ -1792,15 +1793,17 @@ sync_pipe_input_cb(gint source, gpointer user_data)
         /* (an error message doesn't mean we have to stop capturing) */
         break;
     case SP_BAD_FILTER: {
-        char *ch;
-        int indx;
+        char *ch=NULL;
+        int indx=0;
 
         ch = strtok(buffer, ":");
-        indx = (int)strtol(ch, NULL, 10);
-        ch = strtok(NULL, ":");
+        if (ch) {
+           indx = (int)strtol(ch, NULL, 10);
+           ch = strtok(NULL, ":");
+        }
         capture_input_cfilter_error_message(cap_session, indx, ch);
-         /* the capture child will close the sync_pipe, nothing to do for now */
-         break;
+        /* the capture child will close the sync_pipe, nothing to do for now */
+        break;
         }
     case SP_DROPS:
         capture_input_drops(cap_session, (guint32)strtoul(buffer, NULL, 10));