diff options
author | Dario Lombardo <lomato@gmail.com> | 2016-09-12 15:07:36 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-09-12 14:33:29 +0000 |
commit | e3247b3a71f1bdb89c40573412ab7b2181212a98 (patch) | |
tree | 1a18eeabe2552e8172728f04ac545f298114a831 | |
parent | 159d4317dc5eff3a450bac44610f9023e96b50e5 (diff) | |
download | wireshark-e3247b3a71f1bdb89c40573412ab7b2181212a98.tar.gz |
fix some compilation issues without extcap.
Change-Id: I18c855e13281013a6277c1f38eeac92e74d52b34
Reviewed-on: https://code.wireshark.org/review/17665
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | rawshark.c | 9 | ||||
-rw-r--r-- | tfshark.c | 10 | ||||
-rw-r--r-- | tshark.c | 10 | ||||
-rw-r--r-- | ui/gtk/main.c | 2 | ||||
-rw-r--r-- | wireshark-qt.cpp | 2 |
5 files changed, 32 insertions, 1 deletions
diff --git a/rawshark.c b/rawshark.c index 510ed80bcf..d4acc8af94 100644 --- a/rawshark.c +++ b/rawshark.c @@ -803,7 +803,9 @@ main(int argc, char *argv[]) g_free(err_msg); epan_free(cfile.epan); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif exit(2); } n_rfcodes++; @@ -825,7 +827,9 @@ main(int argc, char *argv[]) if (raw_cf_open(&cfile, pipe_name) != CF_OK) { epan_free(cfile.epan); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif exit(2); } @@ -847,7 +851,9 @@ main(int argc, char *argv[]) if (!load_cap_file(&cfile)) { epan_free(cfile.epan); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif exit(2); } } else { @@ -858,8 +864,9 @@ main(int argc, char *argv[]) epan_free(cfile.epan); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); - +#endif return 0; } @@ -867,7 +867,9 @@ main(int argc, char *argv[]) * $ ./tools/valgrind-wireshark -n * much more useful. */ epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif return 0; case 'O': /* Only output these protocols */ /* already processed; just ignore it now */ @@ -995,7 +997,9 @@ main(int argc, char *argv[]) cmdarg_err("%s", err_msg); g_free(err_msg); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif return 2; } } @@ -1006,7 +1010,9 @@ main(int argc, char *argv[]) cmdarg_err("%s", err_msg); g_free(err_msg); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif return 2; } } @@ -1052,7 +1058,9 @@ main(int argc, char *argv[]) open_routine reader to use, then the following needs to change. */ if (cf_open(&cfile, cf_name, WTAP_TYPE_AUTO, FALSE, &err) != CF_OK) { epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif return 2; } @@ -1091,7 +1099,9 @@ main(int argc, char *argv[]) funnel_dump_all_text_windows(); epan_free(cfile.epan); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif output_fields_free(output_fields); output_fields = NULL; @@ -1311,7 +1311,9 @@ main(int argc, char *argv[]) * $ ./tools/valgrind-wireshark -n * much more useful. */ epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif return 0; case 'O': /* Only output these protocols */ /* already processed; just ignore it now */ @@ -1731,7 +1733,9 @@ main(int argc, char *argv[]) cmdarg_err("%s", err_msg); g_free(err_msg); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif #ifdef HAVE_PCAP_OPEN_DEAD { pcap_t *pc; @@ -1758,7 +1762,9 @@ main(int argc, char *argv[]) cmdarg_err("%s", err_msg); g_free(err_msg); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif #ifdef HAVE_PCAP_OPEN_DEAD { pcap_t *pc; @@ -1870,7 +1876,9 @@ main(int argc, char *argv[]) */ if (cf_open(&cfile, cf_name, in_file_type, FALSE, &err) != CF_OK) { epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif return 2; } @@ -2032,7 +2040,9 @@ main(int argc, char *argv[]) funnel_dump_all_text_windows(); epan_free(cfile.epan); epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif output_fields_free(output_fields); output_fields = NULL; diff --git a/ui/gtk/main.c b/ui/gtk/main.c index 860e824fe2..09ae47147a 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -2756,7 +2756,9 @@ main(int argc, char *argv[]) epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif AirPDcapDestroyContext(&airpdcap_ctx); diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index 69f03d7f7f..950950774d 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -857,7 +857,9 @@ int main(int argc, char *argv[]) epan_cleanup(); +#ifdef HAVE_EXTCAP extcap_cleanup(); +#endif AirPDcapDestroyContext(&airpdcap_ctx); |