aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2006-01-22 16:26:41 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2006-01-22 16:26:41 +0000
commite09e2c27ab9ed0ac7c7d1bc21d8e693f97103f88 (patch)
treee1fb038745f931088696bf5afb2b5e2f76faca3a /capture.c
parentff5ec0aa65b6b594e568c1d9a5d6dc3edcb1082c (diff)
show the number of packets captured, if "Update list of packets ..." isn't used
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17071 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/capture.c b/capture.c
index 4cfb3fc4b7..96cc745e74 100644
--- a/capture.c
+++ b/capture.c
@@ -217,7 +217,7 @@ guint32 drops)
}
/* if we didn't captured even a single packet, close the file again */
- if(cf_packet_count(capture_opts->cf) == 0 && !capture_opts->restart) {
+ if(cf_get_packet_count(capture_opts->cf) == 0 && !capture_opts->restart) {
simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK,
"%sNo packets captured!%s\n"
"\n"
@@ -327,9 +327,6 @@ capture_input_new_packets(capture_options *capture_opts, int to_read)
XXX - abort on a read error? */
cf_callback_invoke(cf_cb_live_capture_update_continue, capture_opts->cf);
-
- /* update the main window, so we get events (e.g. from the stop toolbar button) */
- main_window_update();
break;
case CF_READ_ABORTED:
@@ -338,8 +335,17 @@ capture_input_new_packets(capture_options *capture_opts, int to_read)
capture_kill_child(capture_opts);
break;
}
+ } else {
+ /* increase capture file packet counter by the number or incoming packets */
+ cf_set_packet_count(capture_opts->cf,
+ cf_get_packet_count(capture_opts->cf) + to_read);
+
+ cf_callback_invoke(cf_cb_live_capture_fixed_continue, capture_opts->cf);
}
+ /* update the main window, so we get events (e.g. from the stop toolbar button) */
+ main_window_update();
+
if(capture_opts->show_info)
capture_info_new_packets(to_read);
}
@@ -408,7 +414,7 @@ capture_input_closed(capture_options *capture_opts)
switch (status) {
case CF_READ_OK:
- if(cf_packet_count(capture_opts->cf) == 0 && !capture_opts->restart) {
+ if(cf_get_packet_count(capture_opts->cf) == 0 && !capture_opts->restart) {
simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK,
"%sNo packets captured!%s\n"
"\n"