Add handling of ringbuffer support when packets are not updated
authortuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 28 Jul 2012 11:13:24 +0000 (11:13 +0000)
committertuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 28 Jul 2012 11:13:24 +0000 (11:13 +0000)
in realtime. This should fix:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7423

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44089 f5534014-38df-0310-8fa8-9805f1628bb7

capture.c

index 063ed7a58503ae15b9f54a67e1d83139bfb8affd..765390278f5e1eaf02b0bef4637c8a0a64da5194 100644 (file)
--- 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) {