Refactoring: new structure for logging alerts

Disruptive actions were moved to actions::disruptive namespace
This commit is contained in:
Felipe Zimmerle
2016-12-01 14:14:54 -03:00
parent bfc30dad34
commit cce6179dcc
14 changed files with 98 additions and 52 deletions

View File

@@ -587,7 +587,7 @@ bool Rule::evaluate(Transaction *trasn) {
if (globalRet == false) {
trasn->debug(4, "Rule returned 0.");
cleanMatchedVars(trasn);
return false;
goto end_clean;
}
trasn->debug(4, "Rule returned 1.");
@@ -599,7 +599,7 @@ bool Rule::evaluate(Transaction *trasn) {
if (this->chainedRule == NULL) {
trasn->debug(4, "Rule is marked as chained but there " \
"isn't a subsequent rule.");
return false;
goto end_clean;
}
trasn->debug(4, "Executing chained rule.");
@@ -609,6 +609,13 @@ bool Rule::evaluate(Transaction *trasn) {
goto end_exec;
}
end_clean:
while (finalVars.empty() == false) {
auto *a = finalVars.back();
finalVars.pop_back();
delete a;
}
return false;
end_exec:
@@ -617,6 +624,12 @@ end_exec:
trasn->serverLog(u);
}
while (finalVars.empty() == false) {
auto *a = finalVars.back();
finalVars.pop_back();
delete a;
}
return true;
}