From 3b9013d39358c54611c8ba82595c3a4ff2f596eb Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 11 Oct 1999 06:39:26 +0000 Subject: When a new display filter is to be applied, don't set "cf.dfilter" or "cf.dfcode" if the new filter doesn't compile, because the filter currently in effect will be the one that was last applied - just free up the text of the new filter, and whatever memory was allocated for the new filter code. This means we allocate a new dfilter when a new filter is to be applied, rather than recycling stuff from the old filter, as we want the old filter code to remain around if the new filter doesn't compile. This means that "cf.dfilter" and "cf.dfcode" will be null if there's no filter in effect. svn path=/trunk/; revision=803 --- summary.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'summary.c') diff --git a/summary.c b/summary.c index 9375ce8bd1..77a0b23162 100644 --- a/summary.c +++ b/summary.c @@ -1,7 +1,7 @@ /* summary.c * Routines for capture file summary window * - * $Id: summary.c,v 1.12 1999/09/09 02:42:26 gram Exp $ + * $Id: summary.c,v 1.13 1999/10/11 06:39:01 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -249,8 +249,8 @@ traffic_bytes/seconds); add_string_to_box(string_buff, capture_box); /* Display filter */ - if (DFILTER_CONTAINS_FILTER(cf.dfcode)) { - snprintf(string_buff, SUM_STR_MAX, "Display filter: %s", cf.dfcode->dftext); + if (cf.dfilter) { + snprintf(string_buff, SUM_STR_MAX, "Display filter: %s", cf.dfilter); } else { sprintf(string_buff, "Display filter: none"); } -- cgit v1.2.1