diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-10-07 03:24:14 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-10-07 03:24:14 +0000 |
commit | 8fc87ba3ba8089e586b396d921f95351bc885ca0 (patch) | |
tree | 628c3cfb67e9538be926e597855cb0d6d05948ed /capture.c | |
parent | f1b498587b4dde692d996b0bea482eb9af974c12 (diff) |
minor fix: fix the sequence while finishing a live capture, so the statusbar information about the file size is correct
svn path=/trunk/; revision=16148
Diffstat (limited to 'capture.c')
-rw-r--r-- | capture.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -346,12 +346,18 @@ capture_input_closed(capture_options *capture_opts) } if(capture_opts->real_time_mode) { - /* first of all, we are not doing a capture any more */ + cf_read_status_t status; + + /* Read what remains of the capture file. */ + status = cf_finish_tail(capture_opts->cf, &err); + + /* Tell the GUI, we are not doing a capture any more. + Must be done after the cf_finish_tail(), so file lengths are displayed + correct. */ cf_callback_invoke(cf_cb_live_capture_update_finished, capture_opts->cf); - /* Read what remains of the capture file, and finish the capture. - XXX - do something if this fails? */ - switch (cf_finish_tail(capture_opts->cf, &err)) { + /* Finish the capture. */ + switch (status) { case CF_READ_OK: if(cf_packet_count(capture_opts->cf) == 0 && !capture_opts->restart) { |