diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-06-01 16:55:10 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-06-01 16:55:10 +0000 |
commit | e51c05a8361b361939017ac01bd0048fa603be3b (patch) | |
tree | dc7ae381a70030ef3191f62360068c20ad13280d /file.c | |
parent | ffec8d8a78c57dfb9d8c74fab27965fd0f022f41 (diff) | |
download | wireshark-e51c05a8361b361939017ac01bd0048fa603be3b.tar.gz wireshark-e51c05a8361b361939017ac01bd0048fa603be3b.tar.bz2 wireshark-e51c05a8361b361939017ac01bd0048fa603be3b.zip |
TShark doesn't need wtap_fdreopen(), as it doesn't do saves and thus
doesn't do safe saves, so wtap_fdreopen() always needs to reopen the
random file descriptor.
At the point where a safe save is done, the sequential read is done, so
the sequential stream is closed; there's no need to reopen it.
(The former fourth argument to wtap_fdreopen() wasn't an indication of
whether the file was compressed, it was an indicationof whether the
random stream should be reopened.)
svn path=/trunk/; revision=42977
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3983,8 +3983,9 @@ cf_save_packets(capture_file *cf, const char *fname, guint save_format, simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, file_rename_error_message(errno), fname); #ifdef _WIN32 - /* Attempt to reopen the file descriptors using fname. */ - if (!wtap_fdreopen(cf->wth, fname, &err, compressed)) { + /* Attempt to reopen the random file descriptor using fname. + (At this point, the sequential file descriptor is closed.) */ + if (!wtap_fdreopen(cf->wth, fname, &err)) { /* Oh, well, we're screwed. */ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, file_open_error_message(err, FALSE), fname); |