diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-09-27 21:46:39 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-09-27 21:46:39 +0000 |
commit | cd64e4627bb89bf767feb1d4c2610c733c53cc12 (patch) | |
tree | 1e7dc0c5aff4b5e55cc318c867b91de9bb631398 /file.c | |
parent | 041a0ef304b1d24c4b22ff88fbc3fce70e7eba1e (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
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 |