aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-09-27 21:46:39 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-09-27 21:46:39 +0000
commitcd64e4627bb89bf767feb1d4c2610c733c53cc12 (patch)
tree1e7dc0c5aff4b5e55cc318c867b91de9bb631398
parent041a0ef304b1d24c4b22ff88fbc3fce70e7eba1e (diff)
minor bugfix: call cf_callback_invoke() from cf_close() even if the file is already closed. Otherwise the GUI will remain in the wrong state if a capture couldn't be started (e.g. wrong interface).
svn path=/trunk/; revision=16024
-rw-r--r--file.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/file.c b/file.c
index aa8dc3d1f9..cdab76a8e8 100644
--- a/file.c
+++ b/file.c
@@ -347,17 +347,19 @@ cf_reset_state(capture_file *cf)
void
cf_close(capture_file *cf)
{
+ /* do GUI things even if file is already closed,
+ * e.g. to cleanup things if a capture couldn't be started */
+ cf_callback_invoke(cf_cb_file_closing, cf);
+
/* close things, if not already closed before */
if(cf->state != FILE_CLOSED) {
- cf_callback_invoke(cf_cb_file_closing, cf);
-
cf_reset_state(cf);
cleanup_dissection();
-
- cf_callback_invoke(cf_cb_file_closed, cf);
}
+
+ cf_callback_invoke(cf_cb_file_closed, cf);
}
cf_read_status_t