diff options
author | João Valverde <j@v6e.pt> | 2021-12-31 16:39:38 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2022-01-01 16:23:04 +0000 |
commit | 12d39efdca10496bfad8688cb7de74218a63d4e9 (patch) | |
tree | 6d8ee008aca534dd0e228b0e808a2d786815ee5c /dftest.c | |
parent | 5ce73acf455b889e1022d47473148b51605d0ca0 (diff) |
Revert "epan: Initialize wiretap"
This reverts commit c15f2aadc1aef3f4855c682ff7f686d5f63088cb.
Crashes on exit. Needs more work.
Fixes #17821.
Diffstat (limited to 'dftest.c')
-rw-r--r-- | dftest.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -31,6 +31,8 @@ #include <wsutil/report_message.h> #include <wsutil/wslog.h> +#include <wiretap/wtap.h> + #include "ui/util.h" #include "ui/cmdarg_err.h" #include "ui/failure_message.h" @@ -87,6 +89,13 @@ main(int argc, char **argv) timestamp_set_type(TS_RELATIVE); timestamp_set_seconds_type(TS_SECONDS_DEFAULT); + /* + * Libwiretap must be initialized before libwireshark is, so that + * dissection-time handlers for file-type-dependent blocks can + * register using the file type/subtype value for the file type. + */ + wtap_init(TRUE); + /* Register all dissectors; we must do this before checking for the "-g" flag, as the "-g" flag dumps a list of fields registered by the dissectors, and we must do it before we read the preferences, |