aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2011-05-19 20:20:35 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2011-05-19 20:20:35 +0000
commit8b701e108a91fd55413ed7b98072b055180a9bf3 (patch)
treeb4aafd3bd96a0f3b77b94df61f8f2f4041853f42 /capture.c
parentd868d6385bb2ea0bceeabd1f76f8f91ad441c94f (diff)
In case we have no interface information in the array, use the global value.
This fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5935. svn path=/trunk/; revision=37307
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/capture.c b/capture.c
index 8631769743..507417a7a6 100644
--- a/capture.c
+++ b/capture.c
@@ -145,10 +145,15 @@ capture_start(capture_options *capture_opts)
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture Start ...");
+ if (capture_opts->ifaces->len == 0) {
+ g_string_printf(source, "%s", get_iface_description(capture_opts));
+ if (capture_opts->cfilter && capture_opts->cfilter[0]) {
+ g_string_append_printf(source, " (%s)", capture_opts->cfilter);
+ }
#ifdef _WIN32
- if (capture_opts->ifaces->len < 2) {
+ } else if (capture_opts->ifaces->len < 2) {
#else
- if (capture_opts->ifaces->len < 4) {
+ } else if (capture_opts->ifaces->len < 4) {
#endif
for (i = 0; i < capture_opts->ifaces->len; i++) {
interface_options interface_opts;