aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authortuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>2011-06-27 19:07:36 +0000
committertuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>2011-06-27 19:07:36 +0000
commit20d6ec1599ae21db5f0d9b619b91b92f4eb95266 (patch)
tree9eb1ae0d32d89ab838a6f808eb2eaba936a95943 /tshark.c
parentf4d706a364081d03f04f1d12af67ca62450fbdef (diff)
Fix the bug reported by Guy. Now
tshark -i en0 icmpp returns a correct error message. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37806 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tshark.c b/tshark.c
index 5045cf44a8..81b0e64030 100644
--- a/tshark.c
+++ b/tshark.c
@@ -834,6 +834,8 @@ main(int argc, char *argv[])
GLogLevelFlags log_flags;
int optind_initial;
gchar *output_only = NULL;
+ guint i;
+ interface_options interface_opts;
#ifdef HAVE_LIBPCAP
#if defined(_WIN32) || defined(HAVE_PCAP_CREATE)
@@ -1397,6 +1399,14 @@ main(int argc, char *argv[])
" and with additional command-line arguments");
return 1;
}
+ for (i = 0; i < global_capture_opts.ifaces->len; i++) {
+ interface_opts = g_array_index(global_capture_opts.ifaces, interface_options, i);
+ if (interface_opts.cfilter == NULL) {
+ interface_opts.cfilter = get_args_as_string(argc, argv, optind);
+ global_capture_opts.ifaces = g_array_remove_index(global_capture_opts.ifaces, i);
+ g_array_insert_val(global_capture_opts.ifaces, i, interface_opts);
+ }
+ }
global_capture_opts.default_options.cfilter = get_args_as_string(argc, argv, optind);
#else
capture_option_specified = TRUE;