aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tshark.c b/tshark.c
index 409a858862..ce2034ef9b 100644
--- a/tshark.c
+++ b/tshark.c
@@ -214,6 +214,8 @@ static proto_node_children_grouper_func node_children_grouper = proto_node_group
/* The line separator used between packets, changeable via the -S option */
static const char *separator = "";
+static gboolean prefs_loaded = FALSE;
+
#ifdef HAVE_LIBPCAP
/*
* TRUE if we're to print packet counts to keep track of captured packets.
@@ -224,8 +226,6 @@ static capture_options global_capture_opts;
static capture_session global_capture_session;
static info_data_t global_info_data;
-static e_prefs *prefs_p = NULL;
-
#ifdef SIGINFO
static gboolean infodelay; /* if TRUE, don't print capture info in SIGINFO handler */
static gboolean infoprint; /* if TRUE, print capture info after clearing infodelay */
@@ -526,7 +526,7 @@ tshark_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
ERROR and CRITICAL level messages so the current code is a behavioral
change. The current behavior is the same as in Wireshark.
*/
- if (prefs_p && (log_level & G_LOG_LEVEL_MASK & prefs.console_log_level) == 0) {
+ if (prefs_loaded && (log_level & G_LOG_LEVEL_MASK & prefs.console_log_level) == 0) {
return;
}
@@ -718,6 +718,7 @@ main(int argc, char *argv[])
dfilter_t *rfcode = NULL;
dfilter_t *dfcode = NULL;
gchar *err_msg;
+ e_prefs *prefs_p;
int log_flags;
gchar *output_only = NULL;
gchar *volatile pdu_export_arg = NULL;
@@ -1029,6 +1030,7 @@ main(int argc, char *argv[])
/* Load libwireshark settings from the current profile. */
prefs_p = epan_load_settings();
+ prefs_loaded = TRUE;
read_filter_list(CFILTER_LIST);