diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2004-07-12 21:00:40 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2004-07-12 21:00:40 +0000 |
commit | 4492f582134108bc20593466cf09ea325502bfb2 (patch) | |
tree | e747bee5bbba59f5dc50b1866e8f541f821688b9 | |
parent | 657f57e62b88881efd5e00cf0030c84d254a9283 (diff) | |
download | wireshark-4492f582134108bc20593466cf09ea325502bfb2.tar.gz wireshark-4492f582134108bc20593466cf09ea325502bfb2.tar.bz2 wireshark-4492f582134108bc20593466cf09ea325502bfb2.zip |
bugfix to a bug reported by jprakashbabu@hotpop.com:
mergecap didn't created a new output file
svn path=/trunk/; revision=11368
-rw-r--r-- | mergecap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mergecap.c b/mergecap.c index 74527020b7..ac3233509e 100644 --- a/mergecap.c +++ b/mergecap.c @@ -1,6 +1,6 @@ /* Combine two dump files, either by appending or by merging by timestamp * - * $Id: mergecap.c,v 1.24 2004/06/30 07:04:42 guy Exp $ + * $Id: mergecap.c,v 1.25 2004/07/12 21:00:40 ulfl Exp $ * * Written by Scott Renfro <scott@renfro.org> based on * editcap by Richard Sharpe and Guy Harris @@ -195,12 +195,12 @@ main(int argc, char *argv[]) out_file.fd = 1 /*stdout*/; } else { /* open the outfile */ - out_file.fd = open(out_filename, O_BINARY | O_WRONLY); + out_file.fd = open(out_filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644); } - if(out_file.fd == -1) { - fprintf(stderr, "mergecap: couldn't open output file\n"); - exit(1); - } + if(out_file.fd == -1) { + fprintf(stderr, "mergecap: couldn't open output file\n"); + exit(1); + } /* prepare the outfile */ if (!merge_open_outfile(&out_file, merge_max_snapshot_length(in_file_count, in_files), &err)) { |