Adds support to MATCHED_VAR variable

This commit is contained in:
Felipe Zimmerle
2015-07-21 11:31:47 -03:00
parent 4f20f5bf74
commit 9d69501961
4 changed files with 107 additions and 0 deletions

View File

@@ -115,7 +115,13 @@ bool Rule::evaluate(Assay *assay) {
}
if (this->chained && this->chainedRule != NULL) {
assay->debug(4, "Executing chained rule.");
if (assay->update_variable_first("MATCHED_VAR",
value) == false) {
assay->store_variable("MATCHED_VAR", value);
}
this->chainedRule->evaluate(assay);
assay->update_variable_first("MATCHED_VAR", "");
}
} else {
assay->debug(4, "Rule returned 0.");