Copy preferences to capture options after the preferences are initially loaded.

We copy them after, for example, switching profiles; we should do so
when they're initially loaded as well.

Change-Id: Iadd67d20b1be8cc14be1b19543f914f71e4c9c00
Reviewed-on: https://code.wireshark.org/review/25208
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2018-01-08 15:40:50 -08:00
parent 51e0d22ec6
commit 7ec5dead2f
2 changed files with 3 additions and 1 deletions

View File

@ -2333,6 +2333,7 @@ main(int argc, char *argv[])
changed either from one of the preferences file or from the command
line that their preferences have changed. */
prefs_apply_all();
prefs_to_capture_opts();
#ifdef HAVE_LIBPCAP
if ((global_capture_opts.num_selected == 0) &&

View File

@ -78,6 +78,7 @@
#include "ui/dissect_opts.h"
#include "ui/commandline.h"
#include "ui/capture_ui_utils.h"
#include "ui/preference_utils.h"
#include "ui/taps.h"
#include "ui/qt/conversation_dialog.h"
@ -789,7 +790,6 @@ int main(int argc, char *qt_argv[])
capture_opts_trim_ring_num_files(&global_capture_opts);
#endif /* HAVE_LIBPCAP */
/* Notify all registered modules that have had any of their preferences
changed either from one of the preferences file or from the command
line that their preferences have changed. */
@ -797,6 +797,7 @@ int main(int argc, char *qt_argv[])
g_log(LOG_DOMAIN_MAIN, G_LOG_LEVEL_INFO, "Calling prefs_apply_all, elapsed time %" G_GUINT64_FORMAT " us \n", g_get_monotonic_time() - start_time);
#endif
prefs_apply_all();
prefs_to_capture_opts();
wsApp->emitAppSignal(WiresharkApplication::PreferencesChanged);
#ifdef HAVE_LIBPCAP