summaryrefslogtreecommitdiff
path: root/ui/capture.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/capture.c')
-rw-r--r--ui/capture.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/ui/capture.c b/ui/capture.c
index 011421c550..c7165b1367 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -266,7 +266,7 @@ capture_input_read_all(capture_session *cap_session, gboolean is_tempfile,
}
/* if we didn't capture even a single packet, close the file again */
- if(cf_get_packet_count((capture_file *)cap_session->cf) == 0 && !capture_opts->restart) {
+ if(cap_session->count == 0 && !capture_opts->restart) {
simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK,
"%sNo packets captured.%s\n"
"\n"
@@ -393,9 +393,6 @@ capture_input_new_packets(capture_session *cap_session, int to_read)
break;
}
} else {
- /* increase the capture file packet counter by the number of incoming packets */
- cf_set_packet_count((capture_file *)cap_session->cf,
- cf_get_packet_count((capture_file *)cap_session->cf) + to_read);
cf_fake_continue_tail((capture_file *)cap_session->cf);
capture_callback_invoke(capture_cb_capture_fixed_continue, cap_session);
@@ -523,7 +520,6 @@ capture_input_closed(capture_session *cap_session, gchar *msg)
{
capture_options *capture_opts = cap_session->capture_opts;
int err;
- int packet_count_save;
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture stopped.");
g_assert(cap_session->state == CAPTURE_PREPARING || cap_session->state == CAPTURE_RUNNING);
@@ -545,8 +541,6 @@ capture_input_closed(capture_session *cap_session, gchar *msg)
/* Read what remains of the capture file. */
status = cf_finish_tail((capture_file *)cap_session->cf, &err);
- /* XXX: If -Q (quit-after-cap) then cf->count clr'd below so save it first */
- packet_count_save = cf_get_packet_count((capture_file *)cap_session->cf);
/* Tell the GUI we are not doing a capture any more.
Must be done after the cf_finish_tail(), so file lengths are
correctly displayed */
@@ -556,7 +550,7 @@ capture_input_closed(capture_session *cap_session, gchar *msg)
switch (status) {
case CF_READ_OK:
- if ((packet_count_save == 0) && !capture_opts->restart) {
+ if (cap_session->count == 0 && !capture_opts->restart) {
simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK,
"%sNo packets captured.%s\n"
"\n"