Split "load_cap_file()" into "open_cap_file()" and "read_cap_file()".
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 15 Aug 1999 00:26:11 +0000 (00:26 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 15 Aug 1999 00:26:11 +0000 (00:26 +0000)
commita043d4e3dcdd9374317d15155c37196dbdad7502
treebdfb8964f1f6ea6f3b429822496ee249fb0fe027
parent350c06ab6149838c041216bb224efff17a724973
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@492 f5534014-38df-0310-8fa8-9805f1628bb7
capture.c
ethereal.c
file.c
file.h