From d482a8d226809ec8318ae54f401d3f97b8e79c1b Mon Sep 17 00:00:00 2001 From: zhengchao Date: Thu, 30 Jun 2022 17:16:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E8=BD=BDplugint=20table=E5=92=8Cxx=5F?= =?UTF-8?q?plugin=20table=E6=97=B6=EF=BC=8Ctable=E4=B8=AD=E7=9A=84rule?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E4=BB=85=E7=BB=9F=E8=AE=A1=E4=B8=8A=E6=AC=A1?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=8E=E7=9A=84=E7=94=9F=E6=95=88rule?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E3=80=82=20=E5=9C=A8=E5=85=A8=E9=87=8F?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=EF=BC=8Crule=20number=E4=BC=9A?= =?UTF-8?q?=E5=8F=98=E4=B8=BA0=EF=BC=8C=E9=83=A8=E5=88=86=E8=A7=A3?= =?UTF-8?q?=E9=87=8A=E4=BA=86=20TSG-11071=20=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_table_runtime.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/entry/Maat_table_runtime.cpp b/src/entry/Maat_table_runtime.cpp index bade9d8..14dcd3e 100644 --- a/src/entry/Maat_table_runtime.cpp +++ b/src/entry/Maat_table_runtime.cpp @@ -317,6 +317,7 @@ int Maat_table_runtime_plugin_commit_ex_schema(struct Maat_table_runtime* table_ Maat_table_runtime_plugin_new_row(table_rt, table_schema, row, logger); } EX_data_rt_update_commit(table_rt->plugin.ex_data_rt); + table_rt->origin_rule_num=EX_data_rt_get_ex_container_count(table_rt->plugin.ex_data_rt); return 0; } MAAT_PLUGIN_EX_DATA Maat_table_runtime_plugin_get_ex_data(struct Maat_table_runtime* table_rt, struct Maat_table_schema* table_schema, const char* key) @@ -359,7 +360,6 @@ void Maat_table_runtime_plugin_new_row(struct Maat_table_runtime* table_rt, stru { EX_data_rt_delete_by_row(plugin_rt->ex_data_rt, row, row+key_offset, key_len, logger); } - table_rt->origin_rule_num=EX_data_rt_get_ex_container_count(plugin_rt->ex_data_rt); } if(plugin_schema->cb_plug_cnt>0) { @@ -377,7 +377,8 @@ void Maat_table_runtime_plugin_new_row(struct Maat_table_runtime* table_rt, stru } void Maat_table_runtime_plugin_update_commit(struct Maat_table_runtime* table_rt) { - EX_data_rt_update_commit(table_rt->plugin.ex_data_rt); + EX_data_rt_update_commit(table_rt->plugin.ex_data_rt); + table_rt->origin_rule_num=EX_data_rt_get_ex_container_count(table_rt->plugin.ex_data_rt); return; } @@ -468,7 +469,6 @@ void Maat_table_runtime_fqdn_plugin_new_row(struct Maat_table_runtime* table_rt, { EX_data_rt_delete_by_row(fqdn_plugin_rt->ex_data_rt, row, row+row_id_offset, row_id_len, logger); } - table_rt->origin_rule_num=EX_data_rt_get_ex_container_count(fqdn_plugin_rt->ex_data_rt); } else { @@ -511,6 +511,7 @@ int Maat_table_runtime_fqdn_plugin_rebuild_fqdn_engine(struct Maat_table_runtime fqdn_rt->fqdn_engine=new_fqdn_engine; Maat_garbage_bagging(table_rt->ref_garbage_bin, old_fqdn_engine, (void (*)(void*))FQDN_engine_free); EX_data_rt_update_commit(fqdn_rt->ex_data_rt); + table_rt->origin_rule_num=EX_data_rt_get_ex_container_count(fqdn_rt->ex_data_rt); free(rules); free(exc_array); @@ -654,6 +655,7 @@ int Maat_table_runtime_ip_plugin_rebuild_ip_matcher(struct Maat_table_runtime* t ip_plugin->ip_matcher=new_ip_matcher; Maat_garbage_bagging(table_rt->ref_garbage_bin, old_ip_matcher, (void (*)(void*))ip_matcher_free); EX_data_rt_update_commit(ip_plugin->ex_data_rt); + table_rt->origin_rule_num=EX_data_rt_get_ex_container_count(ip_plugin->ex_data_rt); free(rules); free(exc_array); @@ -713,7 +715,6 @@ void Maat_table_runtime_ip_plugin_new_row(struct Maat_table_runtime* table_rt, s ip_rule_free(ip_rule); ip_rule=NULL; } - table_rt->origin_rule_num=EX_data_rt_get_ex_container_count(ip_plugin_rt->ex_data_rt); } else {