summaryrefslogtreecommitdiff
path: root/summary.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2007-08-22 16:30:16 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2007-08-22 16:30:16 +0000
commit2f77efce7da0a079c38609e7bd24cc69937863b1 (patch)
tree2c5d954d066dd1bc7b7b81af5e15b2ebea283dcd /summary.c
parent914e885354a310ae9219a9cd42da5f1123a3acc3 (diff)
downloadwireshark-2f77efce7da0a079c38609e7bd24cc69937863b1.tar.gz
Fix bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1757 :
Try to call get_interface_descriptive_name() as little as possible (storing the result in capture_opts) to avoid a performance hit during live capture (especially if you have lots of interfaces) and to avoid leaking memory. One issue with this is that capture_opts.c cannot (without adding significant dependencies) set the iface_descr so readers of that field (only gtk/main.c and tshark.c) use a macro to (set if not already set and) get the value of that field. svn path=/trunk/; revision=22587
Diffstat (limited to 'summary.c')
-rw-r--r--summary.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/summary.c b/summary.c
index 9633550fc0..2d8b92651e 100644
--- a/summary.c
+++ b/summary.c
@@ -123,10 +123,6 @@ summary_fill_in_capture(capture_options *capture_opts, summary_tally *st)
{
st->cfilter = capture_opts->cfilter;
st->iface = capture_opts->iface;
- if(st->iface) {
- st->iface_descr = get_interface_descriptive_name(st->iface);
- } else {
- st->iface_descr = NULL;
- }
+ st->iface_descr = GET_IFACE_DESCR(capture_opts);
}
#endif