From dda54b519ee31beaf91806b263d0ee5d9082363d Mon Sep 17 00:00:00 2001 From: zhengchao Date: Mon, 19 Oct 2020 16:11:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4FQDN=20Plug?= =?UTF-8?q?in=E9=85=8D=E7=BD=AE=E6=97=B6=E4=BA=A7=E7=94=9F=E7=9A=84?= =?UTF-8?q?=E5=86=85=E5=AD=98=E6=B3=84=E9=9C=B2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_hierarchy.cpp | 8 +++++++- src/entry/Maat_rule.cpp | 2 +- src/entry/Maat_table_runtime.cpp | 3 +-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/entry/Maat_hierarchy.cpp b/src/entry/Maat_hierarchy.cpp index 7965a66..33cfaf9 100644 --- a/src/entry/Maat_hierarchy.cpp +++ b/src/entry/Maat_hierarchy.cpp @@ -775,6 +775,12 @@ static struct bool_matcher* Maat_hierarchy_build_bool_matcher(struct Maat_hierar //STEP 3, serial clause states to a bool expression array. compile_num=HASH_COUNT(hier->hash_compile_by_id); + if(compile_num==0) + { + MESA_handle_runtime_log(hier->logger, RLOG_LV_FATAL, module_maat_hierarchy, + "No compile to build."); + return NULL; + } bool_expr_array=ALLOC(struct bool_expr, compile_num); HASH_ITER(hh, hier->hash_compile_by_id, compile, tmp_compile) { @@ -806,7 +812,7 @@ static struct bool_matcher* Maat_hierarchy_build_bool_matcher(struct Maat_hierar if(expr_cnt==0) { MESA_handle_runtime_log(hier->logger, RLOG_LV_FATAL, module_maat_hierarchy, - "No expr to build."); + "No bool expression to build."); return NULL; } bm=bool_matcher_new(bool_expr_array, expr_cnt, hier->thread_num, &mem_size); diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 4050885..da4cd19 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -56,7 +56,7 @@ extern "C" } #endif -int MAAT_FRAME_VERSION_3_0_20200927=1; +int MAAT_FRAME_VERSION_3_0_20201019=1; int is_valid_table_name(const char* str) { diff --git a/src/entry/Maat_table_runtime.cpp b/src/entry/Maat_table_runtime.cpp index 292c3e2..6928371 100644 --- a/src/entry/Maat_table_runtime.cpp +++ b/src/entry/Maat_table_runtime.cpp @@ -469,11 +469,10 @@ void Maat_table_runtime_fqdn_plugin_new_row(struct Maat_table_runtime* table_rt, fqdn_plugin_schema->fqdn_column, row); return; } - fqdn_rule=fqdn_rule_new((unsigned int)atoi(row+row_id_offset), row+fqdn_offset, fqdn_len, atoi(row+is_suffix_flag_offset)); if(atoi(row+is_valid_offset)==1)//add { - + fqdn_rule=fqdn_rule_new((unsigned int)atoi(row+row_id_offset), row+fqdn_offset, fqdn_len, atoi(row+is_suffix_flag_offset)); EX_data_rt_row2EX_data(fqdn_plugin_rt->ex_data_rt, row, row+row_id_offset, row_id_len, fqdn_rule, logger); } else