aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-02-04 08:52:38 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-02-04 08:52:38 +0000
commit3a7097a8fbd8a1051b574a47d27298ee09aa989b (patch)
tree82ea6e4f70374770459112d6606299c915a9fa1b /capture_sync.c
parent10ee9093c8913a0505516a78a1ac0fa4b13b2810 (diff)
remove access to global cfile, use access functions and capture_opts instead
svn path=/trunk/; revision=13285
Diffstat (limited to 'capture_sync.c')
-rw-r--r--capture_sync.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/capture_sync.c b/capture_sync.c
index 217b8d7c0f..8dcf754ba7 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -81,6 +81,7 @@
#include <epan/prefs.h>
#include "globals.h"
+#include "file.h"
#include "capture.h"
#include "capture_sync.h"
@@ -243,7 +244,7 @@ sync_pipe_do_capture(capture_options *capture_opts, gboolean is_tempfile) {
argv = sync_pipe_add_arg(argv, &argc, CHILD_NAME);
argv = sync_pipe_add_arg(argv, &argc, "-i");
- argv = sync_pipe_add_arg(argv, &argc, cfile.iface);
+ argv = sync_pipe_add_arg(argv, &argc, cf_get_iface(capture_opts->cf));
argv = sync_pipe_add_arg(argv, &argc, "-w");
argv = sync_pipe_add_arg(argv, &argc, capture_opts->save_file);
@@ -320,9 +321,9 @@ sync_pipe_do_capture(capture_options *capture_opts, gboolean is_tempfile) {
/* Convert filter string to a quote delimited string and pass to child */
filterstring = NULL;
- if (cfile.cfilter != NULL && strlen(cfile.cfilter) != 0) {
+ if (cf_get_cfilter(capture_opts->cf) != NULL && strlen(cf_get_cfilter(capture_opts->cf)) != 0) {
argv = sync_pipe_add_arg(argv, &argc, "-f");
- filterstring = sync_pipe_quote_encapsulate(cfile.cfilter);
+ filterstring = sync_pipe_quote_encapsulate(cf_get_cfilter(capture_opts->cf));
argv = sync_pipe_add_arg(argv, &argc, filterstring);
}
@@ -347,9 +348,9 @@ sync_pipe_do_capture(capture_options *capture_opts, gboolean is_tempfile) {
argv = sync_pipe_add_arg(argv, &argc, "-m");
argv = sync_pipe_add_arg(argv, &argc, prefs.PREFS_GUI_FONT_NAME);
- if (cfile.cfilter != NULL && strlen(cfile.cfilter) != 0) {
+ if (cf_get_cfilter(capture_opts->cf) != NULL && cf_get_cfilter(capture_opts->cf) != 0) {
argv = sync_pipe_add_arg(argv, &argc, "-f");
- argv = sync_pipe_add_arg(argv, &argc, cfile.cfilter);
+ argv = sync_pipe_add_arg(argv, &argc, cf_get_cfilter(capture_opts->cf));
}
if ((capture_opts->fork_child = fork()) == 0) {
@@ -484,7 +485,7 @@ sync_pipe_do_capture(capture_options *capture_opts, gboolean is_tempfile) {
/* The child process started a capture.
Attempt to open the capture file and set up to read it. */
- err = cf_start_tail(capture_opts->save_file, is_tempfile, &cfile);
+ err = cf_start_tail(capture_opts->save_file, is_tempfile, capture_opts->cf);
if (err != 0) {
/* We weren't able to open the capture file; user has been
alerted. Close the sync pipe. */