aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-02-17 11:53:11 +0000
committerGuy Harris <guy@alum.mit.edu>2006-02-17 11:53:11 +0000
commit9124329ee27b452dfe40827f703bdb3a00b9bb95 (patch)
tree971d95408b5968c41019320e696f77ea21445788 /capture_sync.c
parentc922673498fe9fc1233553d542c4310a4dee6be3 (diff)
We now quote args as necessary on Windows when constructing the command
line, so there's no need to quote them when adding the arguments. svn path=/trunk/; revision=17332
Diffstat (limited to 'capture_sync.c')
-rw-r--r--capture_sync.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/capture_sync.c b/capture_sync.c
index ccc40f318c..f6e03e7547 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -491,23 +491,19 @@ sync_pipe_start(capture_options *capture_opts) {
argv = sync_pipe_add_arg(argv, &argc, "-B");
g_snprintf(buffer_size, ARGV_NUMBER_LEN, "%d",capture_opts->buffer_size);
argv = sync_pipe_add_arg(argv, &argc, buffer_size);
+#endif
- /* Convert filter string to a quote delimited string and pass to child */
- filterstring = NULL;
- if (capture_opts->cfilter != NULL && strlen(capture_opts->cfilter) != 0) {
+ if (capture_opts->cfilter) {
argv = sync_pipe_add_arg(argv, &argc, "-f");
- filterstring = g_strdup_printf("\"%s\"", capture_opts->cfilter);
- argv = sync_pipe_add_arg(argv, &argc, filterstring);
+ argv = sync_pipe_add_arg(argv, &argc, capture_opts->cfilter);
}
- /* Convert save file name to a quote delimited string and pass to child */
- savefilestring = NULL;
if(capture_opts->save_file) {
argv = sync_pipe_add_arg(argv, &argc, "-w");
- savefilestring = g_strdup_printf("\"%s\"", capture_opts->save_file);
- argv = sync_pipe_add_arg(argv, &argc, savefilestring);
+ argv = sync_pipe_add_arg(argv, &argc, capture_opts->save_file);
}
+#ifdef _WIN32
/* init SECURITY_ATTRIBUTES */
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle = TRUE;
@@ -600,16 +596,6 @@ sync_pipe_start(capture_options *capture_opts) {
return FALSE;
}
- if (capture_opts->cfilter != NULL && capture_opts->cfilter != 0) {
- argv = sync_pipe_add_arg(argv, &argc, "-f");
- argv = sync_pipe_add_arg(argv, &argc, capture_opts->cfilter);
- }
-
- if(capture_opts->save_file) {
- argv = sync_pipe_add_arg(argv, &argc, "-w");
- argv = sync_pipe_add_arg(argv, &argc, capture_opts->save_file);
- }
-
if ((capture_opts->fork_child = fork()) == 0) {
/*
* Child process - run Ethereal with the right arguments to make