Added and extended Santeri Paavolainen's <santtu@ssh.fi> patch

to avoid applying NULL dfilters while setting colorization dfilters
during an ongoing, screen-updating, capture.

svn path=/trunk/; revision=734
This commit is contained in:
Gilbert Ramirez 1999-09-29 14:41:34 +00:00
parent 2ba5608a0b
commit 901754eb9b
2 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/* dfilter.c
* Routines for display filters
*
* $Id: dfilter.c,v 1.19 1999/08/30 16:01:42 gram Exp $
* $Id: dfilter.c,v 1.20 1999/09/29 14:41:33 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -329,6 +329,8 @@ gboolean
dfilter_apply(dfilter *dfcode, proto_tree *ptree, const guint8* pd)
{
gboolean retval;
if (dfcode == NULL)
return FALSE;
retval = dfilter_apply_node(dfcode->dftree, ptree, pd);
return retval;
}

6
file.c
View File

@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
* $Id: file.c,v 1.98 1999/09/24 05:22:28 gram Exp $
* $Id: file.c,v 1.99 1999/09/29 14:41:34 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -522,6 +522,10 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, const u_char *buf
color = -1;
for(crow = 0; cf->colors->num_of_filters &&
crow < cf->colors->num_of_filters; crow++) {
if(color_filter(cf,crow)->c_colorfilter == NULL) {
continue;
}
if(dfilter_apply(color_filter(cf,crow)->c_colorfilter, protocol_tree,
cf->pd)){
color = crow;