From 485bc456c57a16dbe50b76c476e48223038bb0e8 Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Tue, 29 Dec 2015 07:57:36 +0100 Subject: extcap: Restore functionality for options Allow stored options to be restored to their default values. This adds a global cleanup method for extcap and globally defined preference values, which fixes the parameter problem with windows Change-Id: I48e0cf846ef81f4732d652c6a2ad0020db5df08e Reviewed-on: https://code.wireshark.org/review/13741 Petri-Dish: Roland Knall Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall --- rawshark.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'rawshark.c') diff --git a/rawshark.c b/rawshark.c index ebfbea4f56..fe68b76f92 100644 --- a/rawshark.c +++ b/rawshark.c @@ -96,6 +96,10 @@ #include "caputils/capture-pcap-util.h" +#ifdef HAVE_EXTCAP +#include "extcap.h" +#endif + #ifdef HAVE_LIBPCAP #include #ifdef _WIN32 @@ -798,6 +802,9 @@ main(int argc, char *argv[]) cmdarg_err("%s", err_msg); g_free(err_msg); epan_free(cfile.epan); +#ifdef HAVE_EXTCAP + extcap_cleanup(); +#endif epan_cleanup(); exit(2); } @@ -819,6 +826,9 @@ main(int argc, char *argv[]) if (raw_cf_open(&cfile, pipe_name) != CF_OK) { epan_free(cfile.epan); +#ifdef HAVE_EXTCAP + extcap_cleanup(); +#endif epan_cleanup(); exit(2); } @@ -840,6 +850,9 @@ main(int argc, char *argv[]) /* Process the packets in the file */ if (!load_cap_file(&cfile)) { epan_free(cfile.epan); +#ifdef HAVE_EXTCAP + extcap_cleanup(); +#endif epan_cleanup(); exit(2); } @@ -850,6 +863,9 @@ main(int argc, char *argv[]) } epan_free(cfile.epan); +#ifdef HAVE_EXTCAP + extcap_cleanup(); +#endif epan_cleanup(); return 0; -- cgit v1.2.1