diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-06-02 18:49:40 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-06-02 18:49:40 +0000 |
commit | 782e8b798baf2abda1d12679822e92763879a598 (patch) | |
tree | 9b6ad66791960b728f7ecc8999e5536b6a1700be /packet-dcerpc-remact.c | |
parent | d643814e7e09d14ae7b4899da8091ef405c6c67a (diff) |
If, when rotating capture files, the attempt to close the current file
fails, set "rb_data.pdh" to NULL, so we know it's not open (if
"wtap_dump_close()" fails, the wtap_dumper_t is still closed - and the
file descriptor for it is probably closed, too, as, if "close()" fails,
the FD is probably closed; the Single UNIX Specification Version 3 says
the state of the FD is unspecified, but in practice most OSes probably
still close it).
If we try to close the current file, first check to make sure it's open,
i.e. that "rb_data.pdh" is non-null. (Or perhaps we should avoid trying
to close it if the open *or* the most recent attempt to rotate the
capture files failed.)
Note that if "wtap_dump_close()" fails we might not need to close the
underlying file descriptor (and, even if we do, there's no guarantee
that attempt won't also fail and leave the FD still open - which is why
I suspect that a failed "close()" leaves the FD closed on most OSes).
svn path=/trunk/; revision=11075
Diffstat (limited to 'packet-dcerpc-remact.c')
0 files changed, 0 insertions, 0 deletions