Wireshark-commits: [Wireshark-commits] master ec094b5: Initialize default stats before using them
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ec094b5cc1b1a94ffa60ed7ba30443013cc45c02
Submitter: Evan Huus (eapache@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
ec094b5 by Evan Huus (eapache@xxxxxxxxx):
Initialize default stats before using them
Quick hack fix for bug 11275.
The longer fix I am still thinking about, but it goes something like this: we
have a terribly confusing dependency graph in ordering our various preferences,
so it's fragile and needs refactoring.
1. We must call epan_init before we read the preferences files, since dissectors
register many preferences.
2. We must call pre_init_prefs before we call prefs_register_modules, since that
inits the default values of the "global" preferences structure. `init_prefs()`
handles this normally.
3. We must call epan_init before we call init_prefs since init_prefs depends on
UATs being initialized (which is something epan_init does).
4. We must call prefs_register_modules before we call epan_init since that
generates the `protocols` subtree which is needed for registering
dissector-specific preferences.
The above graph has a cycle, which I *think* can be solved by splitting
prefs_register_modules?
Bug: 11275
Change-Id: I08dae6a7ade178896e0de5e5091f7eeaca95846f
Reviewed-on: https://code.wireshark.org/review/9098
Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
Actions performed:
from 137c495 Run compress-pngs.sh.
adds ec094b5 Initialize default stats before using them
Summary of changes:
epan/prefs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)