aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dfilter
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2009-10-26 09:06:45 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2009-10-26 09:06:45 +0000
commitceab9dbbceebcf6ffed5cd36f1b738ad5ba43025 (patch)
treed53ccb20ace86a5cd3dfe397a52804fb1ceff601 /epan/dfilter
parent64e4ee759d56e89dd19a3b36bd72d5a796704467 (diff)
Try to parse unparsed token in accordance with fieldtype of all fileds with the same name.
svn path=/trunk/; revision=30705
Diffstat (limited to 'epan/dfilter')
-rw-r--r--epan/dfilter/semcheck.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/epan/dfilter/semcheck.c b/epan/dfilter/semcheck.c
index dcf26b1d0a..46c3b9fc52 100644
--- a/epan/dfilter/semcheck.c
+++ b/epan/dfilter/semcheck.c
@@ -535,11 +535,22 @@ check_relation_LHS_FIELD(const char *relation_string, FtypeCanFunc can_func,
/* Convert to a FT_PCRE */
fvalue = fvalue_from_unparsed(FT_PCRE, s, FALSE, dfilter_fail);
} else {
- fvalue = fvalue_from_unparsed(ftype1, s, allow_partial_value, dfilter_fail);
- if (!fvalue) {
- /* check value_string */
- fvalue = mk_fvalue_from_val_string(hfinfo1, s);
- }
+ do {
+ fvalue = fvalue_from_unparsed(ftype1, s, allow_partial_value, dfilter_fail);
+ if (!fvalue) {
+ /* check value_string */
+ fvalue = mk_fvalue_from_val_string(hfinfo1, s);
+ }
+ if (!fvalue) {
+ /* Try another field with the same name */
+ if (hfinfo1->same_name_prev) {
+ hfinfo1 = hfinfo1->same_name_prev;
+ ftype1 = hfinfo1->type;
+ } else {
+ break;
+ }
+ }
+ } while (!fvalue);
}
if (!fvalue) {
THROW(TypeError);