diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-04-16 20:08:00 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-04-16 20:08:00 +0000 |
commit | 83dc83abd8dca40a7ee13b97855dbda4f01737ec (patch) | |
tree | 3bac5a359bfb27c7a0c59f4cd0b7ed229ff1208e /capture.c | |
parent | 708dae1a17665c8dd4ccac770e4b509dc09fc0b1 (diff) |
rename capture_clear() to capture_restart()
statusbar update should work now even in capture error case
svn path=/trunk/; revision=14105
Diffstat (limited to 'capture.c')
-rw-r--r-- | capture.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -104,7 +104,7 @@ capture_stop(capture_options *capture_opts) void -capture_clear(capture_options *capture_opts) +capture_restart(capture_options *capture_opts) { capture_opts->restart = TRUE; capture_stop(capture_opts); @@ -263,6 +263,8 @@ capture_input_new_packets(capture_options *capture_opts, int to_read) int err; + g_assert(capture_opts->save_file); + if(capture_opts->real_time_mode) { /* Read from the capture file the number of records the child told us it added. @@ -296,6 +298,15 @@ capture_input_closed(capture_options *capture_opts) int err; + /* if we have no file (happens if an error occured), do a fake start */ + if(capture_opts->save_file == NULL) { + if(capture_opts->real_time_mode) { + cf_callback_invoke(cf_cb_live_capture_update_started, capture_opts); + } else { + cf_callback_invoke(cf_cb_live_capture_fixed_started, capture_opts); + } + } + if(capture_opts->real_time_mode) { /* first of all, we are not doing a capture any more */ cf_callback_invoke(cf_cb_live_capture_update_finished, capture_opts->cf); @@ -339,6 +350,7 @@ capture_input_closed(capture_options *capture_opts) /* if we couldn't open a capture file, there's nothing more for us to do */ if(capture_opts->save_file == NULL) { + cf_close(capture_opts->cf); return; } |