aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorUli Heilmeier <uh@heilmeier.eu>2020-11-21 22:29:36 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2020-11-23 08:34:09 +0000
commit0fad19b7d93a238a12ebfaab961fb9b21e3d32f7 (patch)
tree654dd8d81acac483865e638d08b96e04f89fb8cd /tshark.c
parent753515f48ff2066e93b11fb2672411df37d96b3e (diff)
tshark: set cf values when quiet and tempfile
When there is no do_dissection cf is missing some variables for cf_close() call. Therefore we have to set them explicitly. Fixes: wireshark/wireshark#17021
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tshark.c b/tshark.c
index d6e38526e2..7e31545b9e 100644
--- a/tshark.c
+++ b/tshark.c
@@ -176,6 +176,7 @@ static gboolean print_summary; /* TRUE if we're to print packet summary info
static gboolean print_details; /* TRUE if we're to print packet details information */
static gboolean print_hex; /* TRUE if we're to print hex/ascci information */
static gboolean line_buffered;
+static gboolean quiet = FALSE;
static gboolean really_quiet = FALSE;
static gchar* delimiter_char = " ";
static gboolean dissect_color = FALSE;
@@ -727,7 +728,6 @@ main(int argc, char *argv[])
gboolean capture_option_specified = FALSE;
volatile int max_packet_count = 0;
#endif
- gboolean quiet = FALSE;
volatile int out_file_type = WTAP_FILE_TYPE_SUBTYPE_PCAPNG;
volatile gboolean out_file_name_res = FALSE;
volatile int in_file_type = WTAP_TYPE_AUTO;
@@ -2681,6 +2681,10 @@ capture_input_new_file(capture_session *cap_session, gchar *new_file)
capture_opts->save_file = NULL;
return FALSE;
}
+ } else if (quiet && is_tempfile) {
+ cf->state = FILE_READ_ABORTED;
+ cf->filename = g_strdup(new_file);
+ cf->is_tempfile = is_tempfile;
}
cap_session->state = CAPTURE_RUNNING;