aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2004-04-25 12:04:08 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2004-04-25 12:04:08 +0000
commit7862ca6700cf3a8adc5822ff99e0d15d76e8df8f (patch)
tree42dde0714aef5ead2cf2385fb258bdf99c01f457 /file.c
parent9fc177114d9340c4dc998c83720755091a23d174 (diff)
put all required data into the print_args,
instead of confusing seperation of data git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10692 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'file.c')
-rw-r--r--file.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/file.c b/file.c
index 4ad09b946b..ea58cf4453 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.378 2004/04/24 23:13:45 ulfl Exp $
+ * $Id: file.c,v 1.379 2004/04/25 12:04:07 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1610,8 +1610,13 @@ print_packets(capture_file *cf, print_args_t *print_args)
int line_len;
psp_return_t ret;
- callback_args.print_fh = open_print_dest(print_args->to_file,
- print_args->dest);
+ if(print_args->to_file) {
+ callback_args.print_fh = open_print_dest(print_args->to_file,
+ print_args->file);
+ } else {
+ callback_args.print_fh = open_print_dest(print_args->to_file,
+ print_args->cmd);
+ }
if (callback_args.print_fh == NULL)
return PP_OPEN_ERROR; /* attempt to open destination failed */