path: root/summary.c
diff options
authorGuy Harris <guy@alum.mit.edu>1999-10-11 06:39:26 +0000
committerGuy Harris <guy@alum.mit.edu>1999-10-11 06:39:26 +0000
commit3b9013d39358c54611c8ba82595c3a4ff2f596eb (patch)
treedfec8b639fbd755acc879b925ce7a2d2dd8e9302 /summary.c
parent29b9c8a2850ae3be73d1fce38a1e96591ba165fb (diff)
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
Diffstat (limited to 'summary.c')
1 files changed, 3 insertions, 3 deletions
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 <gerald@zing.org>
@@ -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");