diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-09 14:06:37 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-09 14:06:37 +0000 |
commit | 9283454d84781adfafc40e92a125a883d671c69d (patch) | |
tree | 68e975746ff052ac412f3c4dcb50f79218705411 | |
parent | b7791089f0a68a1ea144b2f4def29828adb8e653 (diff) | |
download | rspamd-9283454d84781adfafc40e92a125a883d671c69d.tar.gz rspamd-9283454d84781adfafc40e92a125a883d671c69d.zip |
Some more fixes to hyperscan match
-rw-r--r-- | src/libserver/re_cache.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index 44eadd385..797361a85 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -449,8 +449,9 @@ rspamd_re_cache_hyperscan_cb (unsigned int id, rt = cbdata->rt; - if (!isset (rt->checked, id)) { - if (flags & HS_FLAG_PREFILTER) { + + if (flags & HS_FLAG_PREFILTER) { + if (!isset (rt->checked, id)) { /* We need to match the corresponding pcre first */ pcre_elt = g_ptr_array_index (rt->cache->re, id); ret = rspamd_re_cache_process_pcre (rt, @@ -459,13 +460,14 @@ rspamd_re_cache_hyperscan_cb (unsigned int id, to - from, FALSE, TRUE); - } - else { - ret = 1; - } + setbit (rt->checked, id); + rt->results[id] = ret; + } + } + else { setbit (rt->checked, id); - rt->results[id] += ret; + rt->results[id] ++; } return 0; |