aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/main.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2014-01-18 15:20:02 +0100
committerEvan Huus <eapache@gmail.com>2014-02-25 17:43:13 +0000
commit579e7e19ce8e5f1a6e16b75f130ad4b001157ca5 (patch)
tree423547b0256e93647f98710cf14e15e112f7f73f /ui/gtk/main.c
parentb6aae8d5c470aa681b70f33cad064dbb7045b3b7 (diff)
Wireshark: Add option to choose format type of capture file
The best heuristic can fail, so add possibility to manually choose capture file format type, so not correctly recognize file format can be loaded in Wireshark. On the other side now it is possible to open capture file as file format to be dissected. Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a Reviewed-on: https://code.wireshark.org/review/16 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'ui/gtk/main.c')
-rw-r--r--ui/gtk/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index a5e706dc9d..8748f0500f 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -2523,6 +2523,8 @@ main(int argc, char *argv[])
g_free(init_progfile_dir_error);
}
+ init_open_routines();
+
#ifdef HAVE_PLUGINS
/* Register all the plugin types we have. */
epan_register_plugin_types(); /* Types known to libwireshark */
@@ -3088,7 +3090,7 @@ main(int argc, char *argv[])
}
}
if (!rfilter_parse_failed) {
- if (cf_open(&cfile, cf_name, FALSE, &err) == CF_OK) {
+ if (cf_open(&cfile, cf_name, WTAP_TYPE_AUTO, FALSE, &err) == CF_OK) {
/* "cf_open()" succeeded, so it closed the previous
capture file, and thus destroyed any previous read filter
attached to "cf". */