aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-04-08 12:45:19 -0700
committerGuy Harris <guy@alum.mit.edu>2017-04-08 20:40:08 +0000
commit2c44a7f930967335b442e899c17e1eb46831e3c1 (patch)
tree7ce2db4007feccf638308dc205f509ec385436a3 /ui
parentf1751ef22fc9877e59fad3b1c60826bff8569d94 (diff)
Clean up handling of enabled/disabled protocols/heuristic dissectors.
Add a "report a warning message" routine to the "report_err" code in libwsutil, and rename files and routines appropriately, as they don't only handle errors any more. Have a routine read_enabled_and_disabled_protos() that reads all the files that enable or disable protocols or heuristic dissectors, enables and disables them based on the contents of those files, and reports errors itself (as warnings) using the new "report a warning message" routine. Fix that error reporting to report separately on the disabled protocols, enabled protocols, and heuristic dissectors files. Have a routine to set up the enabled and disabled protocols and heuristic dissectors from the command-line arguments, so it's done the same way in all programs. If we try to enable or disable an unknown heuristic dissector via a command-line argument, report an error. Update a bunch of comments. Update the name of disabled_protos_cleanup(), as it cleans up information for disabled *and* enabled protocols and for heuristic dissectors. Support the command-line flags to enable and disable protocols and heuristic dissectors in tfshark. Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df Reviewed-on: https://code.wireshark.org/review/20966 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui')
-rw-r--r--ui/alert_box.c6
-rw-r--r--ui/alert_box.h5
-rw-r--r--ui/cli/tap-stats_tree.c2
-rw-r--r--ui/dissect_opts.c44
-rw-r--r--ui/dissect_opts.h10
-rw-r--r--ui/gtk/compare_stat.c2
-rw-r--r--ui/gtk/main.c119
-rw-r--r--ui/gtk/rtp_player.c2
-rw-r--r--ui/gtk/simple_dialog.c9
-rw-r--r--ui/gtk/stats_tree_stat.c2
-rw-r--r--ui/gtk/uat_gui.c2
-rw-r--r--ui/qt/main_window.cpp16
-rw-r--r--ui/qt/main_window_slots.cpp3
-rw-r--r--ui/qt/uat_dialog.cpp2
-rw-r--r--ui/qt/wireshark_application.cpp62
-rw-r--r--ui/qt/wireshark_application.h2
-rw-r--r--ui/simple_dialog.h5
17 files changed, 144 insertions, 149 deletions
diff --git a/ui/alert_box.c b/ui/alert_box.c
index c367fb43c7..d49c30b660 100644
--- a/ui/alert_box.c
+++ b/ui/alert_box.c
@@ -52,6 +52,12 @@ vfailure_alert_box(const char *msg_format, va_list ap)
vsimple_error_message_box(msg_format, ap);
}
+void
+vwarning_alert_box(const char *msg_format, va_list ap)
+{
+ vsimple_error_message_box(msg_format, ap);
+}
+
/*
* Alert box for a failed attempt to open or create a file.
* "err" is assumed to be a UNIX-style errno; "for_writing" is TRUE if
diff --git a/ui/alert_box.h b/ui/alert_box.h
index 1028027eb1..9e8c6a64f6 100644
--- a/ui/alert_box.h
+++ b/ui/alert_box.h
@@ -35,6 +35,11 @@ extern void failure_alert_box(const char *msg_format, ...) G_GNUC_PRINTF(1, 2);
extern void vfailure_alert_box(const char *msg_format, va_list ap);
/*
+ * Alert box for general warnings.
+ */
+extern void vwarning_alert_box(const char *msg_format, va_list ap);
+
+/*
* Alert box for a failed attempt to open or create a file.
* "err" is assumed to be a UNIX-style errno; "for_writing" is TRUE if
* the file is being opened for writing and FALSE if it's being opened
diff --git a/ui/cli/tap-stats_tree.c b/ui/cli/tap-stats_tree.c
index e3d7b7ac30..1fbfc09995 100644
--- a/ui/cli/tap-stats_tree.c
+++ b/ui/cli/tap-stats_tree.c
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <glib.h>
-#include <wsutil/report_err.h>
+#include <wsutil/report_message.h>
#include <epan/stats_tree_priv.h>
#include <epan/stat_tap_ui.h>
diff --git a/ui/dissect_opts.c b/ui/dissect_opts.c
index 65afd245c1..6b2ac21121 100644
--- a/ui/dissect_opts.c
+++ b/ui/dissect_opts.c
@@ -34,6 +34,7 @@
#include <epan/prefs.h>
#include <epan/timestamp.h>
#include <epan/addr_resolv.h>
+#include <epan/disabled_protos.h>
#include "ui/decode_as_utils.h"
@@ -161,6 +162,49 @@ dissect_opts_handle_opt(int opt, char *optarg_str_p)
return TRUE;
}
+gboolean
+setup_enabled_and_disabled_protocols(void)
+{
+ gboolean success = TRUE;
+
+ if (global_dissect_options.disable_protocol_slist) {
+ GSList *proto_disable;
+
+ for (proto_disable = global_dissect_options.disable_protocol_slist; proto_disable != NULL; proto_disable = g_slist_next(proto_disable))
+ proto_disable_proto_by_name((char*)proto_disable->data);
+ }
+
+ if (global_dissect_options.enable_protocol_slist) {
+ GSList *proto_enable;
+
+ for (proto_enable = global_dissect_options.enable_protocol_slist; proto_enable != NULL; proto_enable = g_slist_next(proto_enable))
+ proto_enable_proto_by_name((char*)proto_enable->data);
+ }
+
+ if (global_dissect_options.enable_heur_slist) {
+ GSList *heur_enable;
+
+ for (heur_enable = global_dissect_options.enable_heur_slist; heur_enable != NULL; heur_enable = g_slist_next(heur_enable)) {
+ if (!proto_enable_heuristic_by_name((char*)heur_enable->data, TRUE)) {
+ cmdarg_err("No such protocol %s, can't enable", (char*)heur_enable->data);
+ success = FALSE;
+ }
+ }
+ }
+
+ if (global_dissect_options.disable_heur_slist) {
+ GSList *heur_disable;
+
+ for (heur_disable = global_dissect_options.disable_heur_slist; heur_disable != NULL; heur_disable = g_slist_next(heur_disable)) {
+ if (!proto_enable_heuristic_by_name((char*)heur_disable->data, FALSE)) {
+ cmdarg_err("No such protocol %s, can't disable", (char*)heur_disable->data);
+ success = FALSE;
+ }
+ }
+ }
+ return success;
+}
+
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/ui/dissect_opts.h b/ui/dissect_opts.h
index 227ebfc291..9ed08a7529 100644
--- a/ui/dissect_opts.h
+++ b/ui/dissect_opts.h
@@ -93,6 +93,16 @@ dissect_opts_init(void);
extern gboolean
dissect_opts_handle_opt(int opt, char *optarg_str_p);
+/*
+ * Set up disabled protocols and enabled/disabled heuristic protocols
+ * as per specified command-line options.
+ *
+ * Returns TRUE if all specified heuristic protocols exist, FALSE
+ * otherwise.
+ */
+extern gboolean
+setup_enabled_and_disabled_protocols(void);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/ui/gtk/compare_stat.c b/ui/gtk/compare_stat.c
index 9a5d7d04a8..224c24b58e 100644
--- a/ui/gtk/compare_stat.c
+++ b/ui/gtk/compare_stat.c
@@ -38,7 +38,7 @@
#include <gtk/gtk.h>
-#include <wsutil/report_err.h>
+#include <wsutil/report_message.h>
#include <epan/stat_tap_ui.h>
#include <epan/to_str.h>
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index b7002f5660..50b3c4c42d 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -53,7 +53,7 @@
#include <wsutil/filesystem.h>
#include <wsutil/file_util.h>
#include <wsutil/privileges.h>
-#include <wsutil/report_err.h>
+#include <wsutil/report_message.h>
#include <ws_version_info.h>
#include <wiretap/merge.h>
@@ -208,6 +208,7 @@
#include <gtkmacintegration/gtkosxapplication.h>
#endif
+#define INVALID_OPTION 1
#define INIT_FAILED 2
#define INVALID_CAPABILITY 2
#define INVALID_LINK_TYPE 2
@@ -1902,12 +1903,10 @@ get_wireshark_runtime_info(GString *str)
}
static e_prefs *
-read_configuration_files(char **gdp_path, char **dp_path)
+read_configuration_files(void)
{
int gpf_open_errno, gpf_read_errno;
int cf_open_errno, df_open_errno;
- int gdp_open_errno, gdp_read_errno;
- int dp_open_errno, dp_read_errno;
char *gpf_path, *pf_path;
char *cf_path, *df_path;
int pf_open_errno, pf_read_errno;
@@ -1972,41 +1971,11 @@ read_configuration_files(char **gdp_path, char **dp_path)
g_free(df_path);
}
- /* Read the disabled protocols file. */
- read_disabled_protos_list(gdp_path, &gdp_open_errno, &gdp_read_errno,
- dp_path, &dp_open_errno, &dp_read_errno);
- read_enabled_protos_list(gdp_path, &gdp_open_errno, &gdp_read_errno,
- dp_path, &dp_open_errno, &dp_read_errno);
- read_disabled_heur_dissector_list(gdp_path, &gdp_open_errno, &gdp_read_errno,
- dp_path, &dp_open_errno, &dp_read_errno);
- if (*gdp_path != NULL) {
- if (gdp_open_errno != 0) {
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
- "Could not open global disabled protocols file\n\"%s\": %s.",
- *gdp_path, g_strerror(gdp_open_errno));
- }
- if (gdp_read_errno != 0) {
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
- "I/O error reading global disabled protocols file\n\"%s\": %s.",
- *gdp_path, g_strerror(gdp_read_errno));
- }
- g_free(*gdp_path);
- *gdp_path = NULL;
- }
- if (*dp_path != NULL) {
- if (dp_open_errno != 0) {
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
- "Could not open your disabled protocols file\n\"%s\": %s.",
- *dp_path, g_strerror(dp_open_errno));
- }
- if (dp_read_errno != 0) {
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
- "I/O error reading your disabled protocols file\n\"%s\": %s.",
- *dp_path, g_strerror(dp_read_errno));
- }
- g_free(*dp_path);
- *dp_path = NULL;
- }
+ /*
+ * Read the files that enable and disable protocols and heuristic
+ * dissectors.
+ */
+ read_enabled_and_disabled_protos();
return prefs_p;
}
@@ -2071,7 +2040,6 @@ main(int argc, char *argv[])
char *rf_path;
int rf_open_errno;
- char *gdp_path, *dp_path;
int err;
#ifdef HAVE_LIBPCAP
gchar *err_str;
@@ -2280,8 +2248,9 @@ main(int argc, char *argv[])
capture_session_init(&global_capture_session, &cfile);
#endif
- init_report_err(vfailure_alert_box, open_failure_alert_box,
- read_failure_alert_box, write_failure_alert_box);
+ init_report_message(vfailure_alert_box, vwarning_alert_box,
+ open_failure_alert_box, read_failure_alert_box,
+ write_failure_alert_box);
/* Non-blank filter means we're remote. Throttle splash screen and resolution updates. */
filter = get_conn_cfilter();
@@ -2357,7 +2326,7 @@ main(int argc, char *argv[])
splash_update(RA_PREFERENCES, NULL, (gpointer)splash_win);
- global_commandline_info.prefs_p = read_configuration_files (&gdp_path, &dp_path);
+ global_commandline_info.prefs_p = read_configuration_files();
/* Removed thread code:
* https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9e277ae6154fd04bf6a0a34ec5655a73e5a736a3
*/
@@ -2476,43 +2445,13 @@ main(int argc, char *argv[])
}
#endif
- /* disabled protocols as per configuration file */
- if (gdp_path == NULL && dp_path == NULL) {
- set_disabled_protos_list();
- set_enabled_protos_list();
- set_disabled_heur_dissector_list();
- }
-
- if(global_dissect_options.disable_protocol_slist) {
- GSList *proto_disable;
- for (proto_disable = global_dissect_options.disable_protocol_slist; proto_disable != NULL; proto_disable = g_slist_next(proto_disable))
- {
- proto_disable_proto_by_name((char*)proto_disable->data);
- }
- }
-
- if(global_dissect_options.enable_protocol_slist) {
- GSList *proto_enable;
- for (proto_enable = global_dissect_options.enable_protocol_slist; proto_enable != NULL; proto_enable = g_slist_next(proto_enable))
- {
- proto_enable_proto_by_name((char*)proto_enable->data);
- }
- }
-
- if(global_dissect_options.disable_heur_slist) {
- GSList *heur_enable;
- for (heur_enable = global_dissect_options.disable_heur_slist; heur_enable != NULL; heur_enable = g_slist_next(heur_enable))
- {
- proto_enable_heuristic_by_name((char*)heur_enable->data, TRUE);
- }
- }
-
- if(global_dissect_options.disable_heur_slist) {
- GSList *heur_disable;
- for (heur_disable = global_dissect_options.disable_heur_slist; heur_disable != NULL; heur_disable = g_slist_next(heur_disable))
- {
- proto_enable_heuristic_by_name((char*)heur_disable->data, FALSE);
- }
+ /*
+ * Enabled and disabled protocols and heuristic dissectors as per
+ * command-line options.
+ */
+ if (!setup_enabled_and_disabled_protocols()) {
+ ret = INVALID_OPTION;
+ goto clean_exit;
}
build_column_format_array(&cfile.cinfo, global_commandline_info.prefs_p->num_cols, TRUE);
@@ -3314,7 +3253,6 @@ static void copy_global_profile (const gchar *profile_name)
/* Change configuration profile */
void change_configuration_profile (const gchar *profile_name)
{
- char *gdp_path, *dp_path;
char *rf_path;
int rf_open_errno;
gchar* err_msg = NULL;
@@ -3347,11 +3285,18 @@ void change_configuration_profile (const gchar *profile_name)
set_profile_name (profile_name);
profile_bar_update ();
- /* Reset current preferences and apply the new */
+ /*
+ * Reset current preferences and enabled/disabled protocols and
+ * heuristic dissectors.
+ */
prefs_reset();
menu_prefs_reset();
+ proto_reenable_all();
- (void) read_configuration_files (&gdp_path, &dp_path);
+ /*
+ * Read the configuration files for the new profile.
+ */
+ (void) read_configuration_files();
if (!recent_read_profile_static(&rf_path, &rf_open_errno)) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
@@ -3379,14 +3324,6 @@ void change_configuration_profile (const gchar *profile_name)
filter_expression_reinit(FILTER_EXPRESSION_REINIT_CREATE);
toolbar_redraw_all();
- /* Enable all protocols and disable from the disabled list */
- proto_enable_all();
- if (gdp_path == NULL && dp_path == NULL) {
- set_disabled_protos_list();
- set_enabled_protos_list();
- set_disabled_heur_dissector_list();
- }
-
/* Reload color filters */
if (!color_filters_reload(&err_msg, color_filter_add_cb)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_msg);
diff --git a/ui/gtk/rtp_player.c b/ui/gtk/rtp_player.c
index 269db47179..7b89901b90 100644
--- a/ui/gtk/rtp_player.c
+++ b/ui/gtk/rtp_player.c
@@ -64,7 +64,7 @@
#include <epan/dissectors/packet-rtp.h>
#include <epan/rtp_pt.h>
#include <epan/prefs.h>
-#include <wsutil/report_err.h>
+#include <wsutil/report_message.h>
#include "globals.h"
diff --git a/ui/gtk/simple_dialog.c b/ui/gtk/simple_dialog.c
index a8359186df..00b4a32af6 100644
--- a/ui/gtk/simple_dialog.c
+++ b/ui/gtk/simple_dialog.c
@@ -545,6 +545,15 @@ simple_error_message_box(const char *msg_format, ...)
}
/*
+ * Warning alert box, taking a format and a va_list argument.
+ */
+void
+vsimple_warning_message_box(const char *msg_format, va_list ap)
+{
+ do_simple_message_box(ESD_TYPE_WARN, NULL, NULL, msg_format, ap);
+}
+
+/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local Variables:
diff --git a/ui/gtk/stats_tree_stat.c b/ui/gtk/stats_tree_stat.c
index cedab7e84c..b2420fd96b 100644
--- a/ui/gtk/stats_tree_stat.c
+++ b/ui/gtk/stats_tree_stat.c
@@ -34,7 +34,7 @@
#include <gtk/gtk.h>
-#include <wsutil/report_err.h>
+#include <wsutil/report_message.h>
#include <wsutil/file_util.h>
#include <epan/stats_tree_priv.h>
diff --git a/ui/gtk/uat_gui.c b/ui/gtk/uat_gui.c
index 247e522835..aea06302cb 100644
--- a/ui/gtk/uat_gui.c
+++ b/ui/gtk/uat_gui.c
@@ -44,7 +44,7 @@
# include <gdk/gdkkeysyms-compat.h>
#endif
-#include <wsutil/report_err.h>
+#include <wsutil/report_message.h>
#include <epan/dfilter/dfilter-macro.h>
#include <epan/proto.h>
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index 35605057b4..d910b73e3c 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -277,6 +277,22 @@ vsimple_error_message_box(const char *msg_format, va_list ap)
sd.exec();
}
+/*
+ * Warning alert box, taking a format and a va_list argument.
+ */
+void
+vsimple_warning_message_box(const char *msg_format, va_list ap)
+{
+#ifdef HAVE_LIBPCAP
+ // We want to quit after reading the capture file, hence
+ // we don't actually open the error dialog.
+ if (global_commandline_info.quit_after_cap)
+ exit(0);
+#endif
+
+ SimpleDialog sd(gbl_cur_main_window_, ESD_TYPE_WARN, ESD_BTN_OK, msg_format, ap);
+ sd.exec();
+}
QMenu* MainWindow::findOrAddMenu(QMenu *parent_menu, QString& menu_text) {
QList<QAction *> actions = parent_menu->actions();
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index 4eef2ec9ca..adec39897b 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -1527,8 +1527,7 @@ void MainWindow::reloadLuaPlugins()
proto_tree_->closeContextMenu();
main_ui_->preferenceEditorFrame->animatedHide();
- char *gdp_path, *dp_path;
- wsApp->readConfigurationFiles(&gdp_path, &dp_path, true);
+ wsApp->readConfigurationFiles(true);
prefs_apply_all();
fieldsChanged();
diff --git a/ui/qt/uat_dialog.cpp b/ui/qt/uat_dialog.cpp
index 6530696924..8a2459a251 100644
--- a/ui/qt/uat_dialog.cpp
+++ b/ui/qt/uat_dialog.cpp
@@ -26,7 +26,7 @@
#include "epan/strutil.h"
#include "epan/uat-int.h"
#include "ui/help_url.h"
-#include <wsutil/report_err.h>
+#include <wsutil/report_message.h>
#include "qt_ui_utils.h"
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp
index 0f25eee0a2..a2637adf9b 100644
--- a/ui/qt/wireshark_application.cpp
+++ b/ui/qt/wireshark_application.cpp
@@ -326,7 +326,6 @@ int WiresharkApplication::monospaceTextSize(const char *str)
void WiresharkApplication::setConfigurationProfile(const gchar *profile_name, bool write_recent)
{
- char *gdp_path, *dp_path;
char *rf_path;
int rf_open_errno;
gchar *err_msg = NULL;
@@ -379,7 +378,7 @@ void WiresharkApplication::setConfigurationProfile(const gchar *profile_name, bo
emit profileNameChanged(profile_name);
/* Apply new preferences */
- readConfigurationFiles (&gdp_path, &dp_path, true);
+ readConfigurationFiles(true);
if (!recent_read_profile_static(&rf_path, &rf_open_errno)) {
simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
@@ -413,14 +412,6 @@ void WiresharkApplication::setConfigurationProfile(const gchar *profile_name, bo
emit captureFilterListChanged();
emit displayFilterListChanged();
- /* Enable all protocols and disable from the disabled list */
- proto_enable_all();
- if (gdp_path == NULL && dp_path == NULL) {
- set_disabled_protos_list();
- set_enabled_protos_list();
- set_disabled_heur_dissector_list();
- }
-
/* Reload color filters */
if (!color_filters_reload(&err_msg, color_filter_add_cb)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_msg);
@@ -1102,20 +1093,23 @@ void WiresharkApplication::allSystemsGo()
#endif
}
-_e_prefs *WiresharkApplication::readConfigurationFiles(char **gdp_path, char **dp_path, bool reset)
+_e_prefs *WiresharkApplication::readConfigurationFiles(bool reset)
{
int gpf_open_errno, gpf_read_errno;
int cf_open_errno, df_open_errno;
- int gdp_open_errno, gdp_read_errno;
- int dp_open_errno, dp_read_errno;
char *gpf_path, *pf_path;
char *cf_path, *df_path;
int pf_open_errno, pf_read_errno;
e_prefs *prefs_p;
if (reset) {
- // reset preferences before reading
+ //
+ // Reset current preferences and enabled/disabled protocols and
+ // heuristic dissectors before reading.
+ // (Needed except when this is called at startup.)
+ //
prefs_reset();
+ proto_reenable_all();
}
/* load the decode as entries of this profile */
@@ -1177,41 +1171,11 @@ _e_prefs *WiresharkApplication::readConfigurationFiles(char **gdp_path, char **d
g_free(df_path);
}
- /* Read the disabled protocols file. */
- read_disabled_protos_list(gdp_path, &gdp_open_errno, &gdp_read_errno,
- dp_path, &dp_open_errno, &dp_read_errno);
- read_enabled_protos_list(gdp_path, &gdp_open_errno, &gdp_read_errno,
- dp_path, &dp_open_errno, &dp_read_errno);
- read_disabled_heur_dissector_list(gdp_path, &gdp_open_errno, &gdp_read_errno,
- dp_path, &dp_open_errno, &dp_read_errno);
- if (*gdp_path != NULL) {
- if (gdp_open_errno != 0) {
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
- "Could not open global disabled protocols file\n\"%s\": %s.",
- *gdp_path, g_strerror(gdp_open_errno));
- }
- if (gdp_read_errno != 0) {
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
- "I/O error reading global disabled protocols file\n\"%s\": %s.",
- *gdp_path, g_strerror(gdp_read_errno));
- }
- g_free(*gdp_path);
- *gdp_path = NULL;
- }
- if (*dp_path != NULL) {
- if (dp_open_errno != 0) {
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
- "Could not open your disabled protocols file\n\"%s\": %s.", *dp_path,
- g_strerror(dp_open_errno));
- }
- if (dp_read_errno != 0) {
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
- "I/O error reading your disabled protocols file\n\"%s\": %s.", *dp_path,
- g_strerror(dp_read_errno));
- }
- g_free(*dp_path);
- *dp_path = NULL;
- }
+ /*
+ * Read the files that enable and disable protocols and heuristic
+ * dissectors.
+ */
+ read_enabled_and_disabled_protos();
return prefs_p;
}
diff --git a/ui/qt/wireshark_application.h b/ui/qt/wireshark_application.h
index 68706699db..fc81bc5333 100644
--- a/ui/qt/wireshark_application.h
+++ b/ui/qt/wireshark_application.h
@@ -103,7 +103,7 @@ public:
void allSystemsGo();
void refreshLocalInterfaces();
- struct _e_prefs * readConfigurationFiles(char **gdp_path, char **dp_path, bool reset);
+ struct _e_prefs * readConfigurationFiles(bool reset);
QList<recent_item_status *> recentItems() const;
void addRecentItem(const QString filename, qint64 size, bool accessible);
void removeRecentItem(const QString &filename);
diff --git a/ui/simple_dialog.h b/ui/simple_dialog.h
index c83e87cdc8..149201ce11 100644
--- a/ui/simple_dialog.h
+++ b/ui/simple_dialog.h
@@ -148,6 +148,11 @@ extern void vsimple_error_message_box(const char *msg_format, va_list ap);
*/
extern void simple_error_message_box(const char *msg_format, ...) G_GNUC_PRINTF(1, 2);
+/*
+ * Warning alert box, taking a format and a va_list argument.
+ */
+extern void vsimple_warning_message_box(const char *msg_format, va_list ap);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */