diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-10-11 06:39:26 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-10-11 06:39:26 +0000 |
commit | 3b9013d39358c54611c8ba82595c3a4ff2f596eb (patch) | |
tree | dfec8b639fbd755acc879b925ce7a2d2dd8e9302 /file.h | |
parent | 29b9c8a2850ae3be73d1fce38a1e96591ba165fb (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 'file.h')
-rw-r--r-- | file.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,7 +1,7 @@ /* file.h * Definitions for file structures and routines * - * $Id: file.h,v 1.48 1999/10/02 20:23:53 guy Exp $ + * $Id: file.h,v 1.49 1999/10/11 06:39:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -104,9 +104,6 @@ typedef struct _capture_file { wtap *wth; /* Wiretap session */ dfilter *rfcode; /* Compiled read filter program */ gchar *dfilter; /* Display filter string */ -#if 0 - GNode *dfcode; /* Compiled display filter program */ -#endif colfilter *colors; /* Colors for colorizing packet window */ dfilter *dfcode; /* Compiled display filter program */ #ifdef HAVE_LIBPCAP @@ -130,8 +127,9 @@ int read_cap_file(capture_file *); int tail_cap_file(char *, capture_file *); /* size_t read_frame_header(capture_file *); */ +void filter_packets(capture_file *cf, gchar *dfilter); +void colorize_packets(capture_file *); int print_packets(capture_file *cf, print_args_t *print_args); -void filter_packets(capture_file *); void change_time_formats(capture_file *); void select_packet(capture_file *, int); void unselect_packet(capture_file *); |