aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorRoland Knall <roland.knall@br-automation.com>2015-12-29 07:57:36 +0100
committerMichael Mann <mmann78@netscape.net>2016-07-29 03:15:54 +0000
commit485bc456c57a16dbe50b76c476e48223038bb0e8 (patch)
tree5fabaa4504ccce8a08ddd23d8bbb8f9aaf60935a /tshark.c
parent191f9bdbc50bd3993259d31dfeeaa95187984fed (diff)
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 <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tshark.c b/tshark.c
index 452e420bb3..7a8c2d4d63 100644
--- a/tshark.c
+++ b/tshark.c
@@ -122,6 +122,10 @@
#include <wsutil/str_util.h>
#include <wsutil/utf8_entities.h>
+#ifdef HAVE_EXTCAP
+#include "extcap.h"
+#endif
+
#ifdef HAVE_PLUGINS
#include <wsutil/plugins.h>
#endif
@@ -1306,6 +1310,9 @@ main(int argc, char *argv[])
* cruft getting in the way. Makes the results of running
* $ ./tools/valgrind-wireshark -n
* much more useful. */
+#ifdef HAVE_EXTCAP
+ extcap_cleanup();
+#endif
epan_cleanup();
return 0;
case 'O': /* Only output these protocols */
@@ -1725,6 +1732,9 @@ main(int argc, char *argv[])
if (!dfilter_compile(rfilter, &rfcode, &err_msg)) {
cmdarg_err("%s", err_msg);
g_free(err_msg);
+#ifdef HAVE_EXTCAP
+ extcap_cleanup();
+#endif
epan_cleanup();
#ifdef HAVE_PCAP_OPEN_DEAD
{
@@ -1751,6 +1761,9 @@ main(int argc, char *argv[])
if (!dfilter_compile(dfilter, &dfcode, &err_msg)) {
cmdarg_err("%s", err_msg);
g_free(err_msg);
+#ifdef HAVE_EXTCAP
+ extcap_cleanup();
+#endif
epan_cleanup();
#ifdef HAVE_PCAP_OPEN_DEAD
{
@@ -1862,6 +1875,9 @@ main(int argc, char *argv[])
* We're reading a capture file.
*/
if (cf_open(&cfile, cf_name, in_file_type, FALSE, &err) != CF_OK) {
+#ifdef HAVE_EXTCAP
+ extcap_cleanup();
+#endif
epan_cleanup();
return 2;
}
@@ -2023,6 +2039,9 @@ main(int argc, char *argv[])
draw_tap_listeners(TRUE);
funnel_dump_all_text_windows();
epan_free(cfile.epan);
+#ifdef HAVE_EXTCAP
+ extcap_cleanup();
+#endif
epan_cleanup();
output_fields_free(output_fields);