diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-08-20 06:01:07 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-08-20 06:01:07 +0000 |
commit | 57198bc28f3fd6e6f885f9fd2f0849ae937497a4 (patch) | |
tree | a29e565b897f9e25c707151a7b603b22316098b4 /dfilter.c | |
parent | a3c225835082cab556616a8ac09a566e2a5e77cc (diff) |
Made handling of byte strings in scanner and parser much simpler,
improving size of grammar and creating the possibility of dfilter_compile
reporting errors back to user. In this case, if an ETHER variable is
compared against a byte string that is not 6 bytes, an error condition is
flagged appropriately. I have not put in the code to conver that error flag
to a message to the user, but that's what I'm working on next.
Also, fixed sample debug session in README to show correct gdb prompt.
svn path=/trunk/; revision=522
Diffstat (limited to 'dfilter.c')
-rw-r--r-- | dfilter.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* dfilter.c * Routines for display filters * - * $Id: dfilter.c,v 1.10 1999/08/14 06:24:27 gram Exp $ + * $Id: dfilter.c,v 1.11 1999/08/20 06:01:07 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -161,6 +161,12 @@ dfilter_clear_filter(dfilter *df) df->dftext = NULL; df->dftree = NULL; df->list_of_byte_arrays = NULL; + + if (df->error_sample) { + g_free(df->error_sample); + } + df->error_sample = NULL; + df->error = DFILTER_ERR_NONE; } /* Allocates new dfilter, initializes values, and returns pointer to dfilter */ |