From dddfe189a1c42da0a0063710de3486f2817ce35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=BCxen?= Date: Thu, 23 Feb 2012 19:14:14 +0000 Subject: Fix the handling of snaplen. While there fix some whitespace issues. svn path=/trunk/; revision=41164 --- summary.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'summary.c') diff --git a/summary.c b/summary.c index 0fe058c7e6..d988817556 100644 --- a/summary.c +++ b/summary.c @@ -166,22 +166,20 @@ summary_fill_in_capture(capture_file *cf,capture_options *capture_opts, summary_ iface.linktype = interface_opts.linktype; g_array_append_val(st->ifaces, iface); } - }else{ - idb_info = wtap_file_get_idb_info(cf->wth); - for (i = 0; i < idb_info->number_of_interfaces; i++) { + } else { + idb_info = wtap_file_get_idb_info(cf->wth); + for (i = 0; i < idb_info->number_of_interfaces; i++) { wtapng_if_descr = g_array_index(idb_info->interface_data, wtapng_if_descr_t, i); iface.cfilter = g_strdup(wtapng_if_descr.if_filter); iface.name = g_strdup(wtapng_if_descr.if_name); iface.descr = g_strdup(wtapng_if_descr.if_description); iface.drops_known = FALSE; iface.drops = 0; - /*iface.has_snap = wtapng_if_descr.has_snaplen;*/ iface.snap = wtapng_if_descr.snap_len; + iface.has_snap = (iface.snap != 65535); iface.linktype = wtapng_if_descr.link_type; g_array_append_val(st->ifaces, iface); - } - - + } } } #endif -- cgit v1.2.3