Refactoring on the RULE variable

This commit is contained in:
Felipe Zimmerle
2018-09-28 22:38:40 -03:00
parent 554251bade
commit 3e8e28da48
11 changed files with 188 additions and 40 deletions

View File

@@ -33,8 +33,6 @@ bool LogData::evaluate(Rule *rule, Transaction *transaction,
std::shared_ptr<RuleMessage> rm) {
rm->m_data = data(transaction);
transaction->m_variableRule.set("logdata", rm->m_data, 0);
return true;
}

View File

@@ -54,8 +54,6 @@ bool Msg::evaluate(Rule *rule, Transaction *transaction,
transaction->debug(9, "Saving msg: " + msg);
#endif
transaction->m_variableRule.set("msg", msg, 0);
return true;
}

View File

@@ -45,7 +45,7 @@ bool SetVar::evaluate(Rule *rule, Transaction *t) {
std::string resolvedPre;
if (m_string) {
resolvedPre = m_string->evaluate(t);
resolvedPre = m_string->evaluate(t, rule);
}
std::string m_variableNameExpanded;

View File

@@ -84,8 +84,6 @@ bool Severity::evaluate(Rule *rule, Transaction *transaction,
transaction->m_highestSeverityAction = this->m_severity;
}
transaction->m_variableRule.set("severity", std::to_string(m_severity), 0);
return true;
}