From 6b3714254d41f4e18ecc1df017804c9d94d21d9b Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 9 Apr 2017 12:27:57 -0700 Subject: Pull all the "load settings" calls into a epan_load_settings() routine. That way, nothing using libwireshark needs to know what settings need to be loaded, they just call epan_load_settings(). Change-Id: I9390e259e286fc4f5acaeaac2767e4c3c4b656af Reviewed-on: https://code.wireshark.org/review/20983 Petri-Dish: Guy Harris Reviewed-by: Guy Harris --- tfshark.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'tfshark.c') diff --git a/tfshark.c b/tfshark.c index e72645aedb..2dcd57385f 100644 --- a/tfshark.c +++ b/tfshark.c @@ -557,7 +557,7 @@ main(int argc, char *argv[]) if (strcmp(argv[2], "column-formats") == 0) column_dump_column_formats(); else if (strcmp(argv[2], "currentprefs") == 0) { - read_prefs(); + epan_load_settings(); write_prefs(NULL); } else if (strcmp(argv[2], "decodes") == 0) @@ -597,13 +597,8 @@ main(int argc, char *argv[]) goto clean_exit; } - prefs_p = read_prefs(); - - /* - * Read the files that enable and disable protocols and heuristic - * dissectors. - */ - read_enabled_and_disabled_lists(); + /* Load libwireshark settings from the current profile. */ + prefs_p = epan_load_settings(); cap_file_init(&cfile); -- cgit v1.2.1