aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-07-06 13:41:52 -0700
committerAnders Broman <a.broman58@gmail.com>2020-07-07 05:28:29 +0000
commit9c53ac018759f6fca092d8aa8411aa9f9411950c (patch)
treea64e4454a1e3e760bc42a620b560a82218699704 /tshark.c
parent45378647d7216b4d1a8202e09119ed4022e964f7 (diff)
extcap: Lazily load our interface list.
Add extcap_ensure_all_interfaces_loaded, which calls extcap_load_interface_list if our interface list is empty. Call it in each of our public functions that require a valid interface list. Clean up the extcap API documentation and note which routines initialize the interface list. In tshark, don't unconditionally call extcap_register_preferences and instead rely on lazy loading. Change-Id: I8493ae5f4d703b0fd767246557d17723bcf207c6 Ping-Bug: 15295 Reviewed-on: https://code.wireshark.org/review/37750 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tshark.c b/tshark.c
index 0c7da3f3e2..a08b9b64d7 100644
--- a/tshark.c
+++ b/tshark.c
@@ -940,7 +940,6 @@ main(int argc, char *argv[])
#ifdef HAVE_PLUGINS
register_all_plugin_tap_listeners();
#endif
- extcap_register_preferences();
/* Register all tap listeners. */
for (tap_reg_t *t = tap_reg_listener; t->cb_func != NULL; t++) {
t->cb_func();
@@ -968,6 +967,7 @@ main(int argc, char *argv[])
if (strcmp(argv[2], "column-formats") == 0)
column_dump_column_formats();
else if (strcmp(argv[2], "currentprefs") == 0) {
+ extcap_register_preferences();
epan_load_settings();
write_prefs(NULL);
}