aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2012-07-28 11:13:24 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2012-07-28 11:13:24 +0000
commite832153387b6beb8088ad5445a6ba75eaf9065cc (patch)
tree35e2fb32162baa9fd0f9296b5abf167aff02b9d5 /capture.c
parent3ed453c4d5dd1695cfd7e55041efc40c620d22f6 (diff)
Add handling of ringbuffer support when packets are not updated
in realtime. This should fix: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7423 svn path=/trunk/; revision=44089
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/capture.c b/capture.c
index 063ed7a585..765390278f 100644
--- a/capture.c
+++ b/capture.c
@@ -338,9 +338,13 @@ capture_input_new_file(capture_options *capture_opts, gchar *new_file)
/* we start a new capture file, close the old one (if we had one before). */
/* (we can only have an open capture file in real_time_mode!) */
if( ((capture_file *) capture_opts->cf)->state != FILE_CLOSED) {
- capture_callback_invoke(capture_cb_capture_update_finished, capture_opts);
- cf_finish_tail(capture_opts->cf, &err);
- cf_close(capture_opts->cf);
+ if(capture_opts->real_time_mode) {
+ capture_callback_invoke(capture_cb_capture_update_finished, capture_opts);
+ cf_finish_tail(capture_opts->cf, &err);
+ cf_close(capture_opts->cf);
+ } else {
+ capture_callback_invoke(capture_cb_capture_fixed_finished, capture_opts);
+ }
}
g_free(capture_opts->save_file);
is_tempfile = FALSE;
@@ -367,6 +371,8 @@ capture_input_new_file(capture_options *capture_opts, gchar *new_file)
capture_opts->save_file = NULL;
return FALSE;
}
+ } else {
+ capture_callback_invoke(capture_cb_capture_prepared, capture_opts);
}
if(capture_opts->show_info) {