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>
This commit is contained in:
Dario Lombardo 2016-09-12 15:07:36 +02:00 committed by Anders Broman
parent 159d4317dc
commit e3247b3a71
5 changed files with 32 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -2756,7 +2756,9 @@ main(int argc, char *argv[])
epan_cleanup();
#ifdef HAVE_EXTCAP
extcap_cleanup();
#endif
AirPDcapDestroyContext(&airpdcap_ctx);

View File

@ -857,7 +857,9 @@ int main(int argc, char *argv[])
epan_cleanup();
#ifdef HAVE_EXTCAP
extcap_cleanup();
#endif
AirPDcapDestroyContext(&airpdcap_ctx);