Variables resolution results now stored into a std::vector instead of std::list

This commit is contained in:
Felipe Zimmerle
2015-11-04 15:51:22 -03:00
parent 2ee5d4ca8f
commit 5bef19aa4d
40 changed files with 143 additions and 275 deletions

View File

@@ -33,11 +33,8 @@
namespace ModSecurity {
namespace Variables {
std::list<transaction::Variable *> *
TimeSec::evaluate(Assay *assay) {
std::list<transaction::Variable *> *resl =
new std::list<transaction::Variable *>();
void TimeSec::evaluateInternal(Assay *assay,
std::vector<const transaction::Variable *> *l) {
char tstr[200];
struct tm timeinfo;
time_t timer;
@@ -48,9 +45,7 @@ std::list<transaction::Variable *> *
localtime_r(&timer, &timeinfo);
strftime(tstr, 200, "%S", &timeinfo);
resl->push_back(new transaction::Variable("TIME_SEC", std::string(tstr)));
return resl;
l->push_back(new transaction::Variable("TIME_SEC", std::string(tstr)));
}