From b8ad5c8d8e348886ebcd54da6a33ce0ac6f0ad9c Mon Sep 17 00:00:00 2001 From: zhengchao Date: Fri, 11 Mar 2016 15:45:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=BE=E7=BD=AEMAAT=5FOPT?= =?UTF-8?q?=5FSCAN=5FDETAIL=E6=9C=AA=E7=94=9F=E6=95=88=E7=9A=84bug?= =?UTF-8?q?=EF=BC=9B=E5=9C=A8rulescan=E4=B8=8D=E8=BF=94=E5=9B=9E=E5=91=BD?= =?UTF-8?q?=E4=B8=AD=E4=BD=8D=E7=BD=AE=E6=97=B6=EF=BC=8C=E4=B8=8D=E5=A1=AB?= =?UTF-8?q?=E5=85=85hit=5Fdetail=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_api.cpp | 6 +++--- src/entry/Maat_rule.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index f11f717..8cde22e 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -434,6 +434,7 @@ Maat_feather_t Maat_feather(int max_thread_num,const char* table_info_path,void* feather->garbage_q=MESA_lqueue_create(0,0); feather->effect_interval_ms=60*1000; feather->scan_interval_ms=1*1000; + feather->rule_scan_type=2; feather->thread_call_cnt=aligment_int64_array_alloc(max_thread_num); return feather; } @@ -541,7 +542,6 @@ int Maat_initiate_feather(Maat_feather_t feather) _feather->scanner=_feather->update_tmp_scanner; _feather->update_tmp_scanner=NULL; _feather->still_working=1; - _feather->rule_scan_type=2; if(_feather->scanner!=NULL) { _feather->maat_version=_feather->scanner->version; @@ -794,7 +794,7 @@ int Maat_full_scan_string_detail(Maat_feather_t feather,int table_id region_result,sizeof(scan_result_t),offsetof(scan_result_t, tag), hit_region_cnt, result,compile_result,rule_num); - if(hit_detail!=NULL) + if(hit_detail!=NULL||_feather->rule_scan_type==0) { *detail_ret=fill_region_hit_detail(data,_mid->inner, region_result,hit_region_cnt, @@ -1193,7 +1193,7 @@ int Maat_stream_scan_string_detail(stream_para_t* stream_para region_result,sizeof(scan_result_t),offsetof(scan_result_t, tag), hit_region_cnt, result,compile_result,rule_num); - if(hit_detail!=NULL) + if(hit_detail!=NULL||sp->feather->rule_scan_type==0) { if(sp->scan_buff!=NULL) { diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index f043cf7..ae7e2a9 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -26,7 +26,7 @@ #include "mesa_fuzzy.h" #include "great_index_engine.h" -int MAAT_FRAME_VERSION_1_5_20160211=1; +int MAAT_FRAME_VERSION_1_5_20160311=1; const char *maat_module="MAAT Frame"; const char* CHARSET_STRING[]={"CHARSET_NONE","GBK","BIG5","UNICODE","UTF-8"};