forked from osmocom/wireshark
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
This commit is contained in:
parent
753515f48f
commit
0fad19b7d9
6
tshark.c
6
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;
|
||||
|
|
Loading…
Reference in New Issue