diff options
-rw-r--r-- | capture_sync.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/capture_sync.c b/capture_sync.c index 0edc715f3c..e013f699ea 100644 --- a/capture_sync.c +++ b/capture_sync.c @@ -334,6 +334,13 @@ sync_pipe_start(capture_options *capture_opts) { argv = g_malloc(sizeof (char *)); *argv = NULL; + /* take ethereal's absolute program path and replace ethereal with dumpcap */ + exename = g_strdup_printf("%s" G_DIR_SEPARATOR_S "dumpcap", + get_progfile_dir()); + + /* Make that the first argument in the argument list (argv[0]). */ + argv = sync_pipe_add_arg(argv, &argc, exename); + argv = sync_pipe_add_arg(argv, &argc, "-i"); argv = sync_pipe_add_arg(argv, &argc, capture_opts->iface); @@ -406,10 +413,6 @@ sync_pipe_start(capture_options *capture_opts) { argv = sync_pipe_add_arg(argv, &argc, "-Z"); #endif - /* take ethereal's absolute program path and replace ethereal with dumpcap */ - exename = g_strdup_printf("%s" G_DIR_SEPARATOR_S "dumpcap", - get_progfile_dir()); - #ifdef _WIN32 argv = sync_pipe_add_arg(argv, &argc, "-B"); g_snprintf(buffer_size, ARGV_NUMBER_LEN, "%d",capture_opts->buffer_size); |