Adds support to MATCHED_VARS_NAMES variable

This commit is contained in:
Felipe Zimmerle
2015-07-21 14:22:12 -03:00
parent 09867791c7
commit b089c44c1a
3 changed files with 94 additions and 1 deletions

View File

@@ -123,9 +123,12 @@ bool Rule::evaluate(Assay *assay) {
assay->store_variable("MATCHED_VAR", value);
}
assay->store_variable("MATCHED_VARS:" + v.first, value);
assay->store_variable("MATCHED_VARS_NAMES:" + v.first,
v.first);
this->chainedRule->evaluate(assay);
assay->update_variable_first("MATCHED_VAR", "");
assay->delete_variable("MATCHED_VARS:" + v.first);
assay->delete_variable("MATCHED_VARS_NAMES:" + v.first);
}
} else {
assay->debug(4, "Rule returned 0.");