Split "load_cap_file()" into "open_cap_file()" and "read_cap_file()".
authorGuy Harris <guy@alum.mit.edu>
Sun, 15 Aug 1999 00:26:11 +0000 (00:26 -0000)
committerGuy Harris <guy@alum.mit.edu>
Sun, 15 Aug 1999 00:26:11 +0000 (00:26 -0000)
commitea6a522b28b69794233e9700cc62d5277281e5e9
treebdfb8964f1f6ea6f3b429822496ee249fb0fe027
parent9e58014e7facc8144b787199e0caa4b975ac0cb2
Split "load_cap_file()" into "open_cap_file()" and "read_cap_file()".
The former, which used to be called by "load_cap_file()", now just opens
the file and, if the open succeeds, closes any capture file we
previously had open, reinitializes any protocols that need
reinitialization, and saves information about the new capture file in
the "capture_file" structure to which it was passed a pointer.  The
latter reads the file already opened by "read_cap_file()".

For "File/Open", call "open_cap_file()" before dismissing the file
selection box; if it fails, "open_cap_file()" will have popped up a
message box complaining about it - just return, leaving the file
selection box open so the user can, after dismissing the message box,
either try again with a different file name, or dismiss the file
selection box.  (Other file selection boxes should be made to work the
same way.)  If "open_cap_file()" succeeds, dismiss the file selection
box, and read the capture file in.

svn path=/trunk/; revision=492
capture.c
ethereal.c
file.c
file.h