aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-10-07 03:24:14 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-10-07 03:24:14 +0000
commit8fc87ba3ba8089e586b396d921f95351bc885ca0 (patch)
tree628c3cfb67e9538be926e597855cb0d6d05948ed
parentf1b498587b4dde692d996b0bea482eb9af974c12 (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
-rw-r--r--capture.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/capture.c b/capture.c
index c89feea5f9..624975e7d3 100644
--- a/capture.c
+++ b/capture.c
@@ -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) {