aboutsummaryrefslogtreecommitdiffstats
path: root/summary.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2012-02-24 13:05:33 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2012-02-24 13:05:33 +0000
commit7194766584248561352b0ea21c320202818d3c52 (patch)
treee196ca02c448b3cd94c479d63d1747267841a1f3 /summary.c
parent64ba56a08090b481dc587fff6058dd0f3cb96e87 (diff)
From Irene Ruengeler: Fix a bug where the interface
names are not shown during capturing. svn path=/trunk/; revision=41175
Diffstat (limited to 'summary.c')
-rw-r--r--summary.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/summary.c b/summary.c
index 4b051d7..221d76a 100644
--- a/summary.c
+++ b/summary.c
@@ -152,7 +152,7 @@ void
summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_tally *st)
{
iface_options iface;
- interface_options interface_opts;
+ interface_t device;
guint i;
wtapng_iface_descriptions_t* idb_info;
wtapng_if_descr_t wtapng_if_descr;
@@ -165,16 +165,19 @@ summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_
g_free(iface.cfilter);
}
if (st->is_tempfile) {
- for (i = 0; i < capture_opts->ifaces->len; i++) {
- interface_opts = g_array_index(capture_opts->ifaces, interface_options, i);
- iface.cfilter = g_strdup(interface_opts.cfilter);
- iface.name = g_strdup(interface_opts.name);
- iface.descr = g_strdup(interface_opts.descr);
- iface.drops_known = FALSE;
- iface.drops = 0;
- iface.has_snap = interface_opts.has_snaplen;
- iface.snap = interface_opts.snaplen;
- iface.linktype = interface_opts.linktype;
+ for (i = 0; i < capture_opts->all_ifaces->len; i++) {
+ device = g_array_index(capture_opts->all_ifaces, interface_t, i);
+ if (!device.selected) {
+ continue;
+ }
+ iface.cfilter = g_strdup(device.cfilter);
+ iface.name = g_strdup(device.name);
+ iface.descr = g_strdup(device.display_name);
+ iface.drops_known = cf->drops_known;
+ iface.drops = cf->drops;
+ iface.has_snap = device.has_snaplen;
+ iface.snap = device.snaplen;
+ iface.linktype = device.active_dlt;
g_array_append_val(st->ifaces, iface);
}
} else {