1.rename rule_state to rule_compile_state

2.recover regex_expr.json to make expr_matcher_gtest pass
This commit is contained in:
root
2024-08-30 08:28:58 +00:00
parent 54a70f19d9
commit 537c75887d
28 changed files with 433 additions and 340 deletions

View File

@@ -545,8 +545,8 @@ int interval_runtime_scan(struct interval_runtime *interval_rt, int thread_id,
long long integer, int attribute_id, struct maat_state *state)
{
//clear rule_state->last_hit_object
if (state != NULL && state->rule_state != NULL) {
rule_state_clear_last_hit_object(state->rule_state);
if (state != NULL && state->rule_compile_state != NULL) {
rule_compile_state_clear_last_hit_object(state->rule_compile_state);
}
if (0 == interval_rt->rule_num) {
@@ -598,13 +598,13 @@ int interval_runtime_scan(struct interval_runtime *interval_rt, int thread_id,
}
next:
if (NULL == state->rule_state) {
state->rule_state = rule_state_new();
if (NULL == state->rule_compile_state) {
state->rule_compile_state = rule_compile_state_new();
alignment_int64_array_add(state->maat_inst->stat->rule_state_cnt,
state->thread_id, 1);
}
return rule_state_update(state->rule_state, state->maat_inst, attribute_id,
return rule_compile_state_update(state->rule_compile_state, state->maat_inst, attribute_id,
state->rule_table_id, state->Nth_scan,
hit_maat_items, real_hit_item_cnt);
}