mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Variables resolution results now stored into a std::vector instead of std::list
This commit is contained in:
@@ -33,11 +33,8 @@
|
||||
namespace ModSecurity {
|
||||
namespace Variables {
|
||||
|
||||
std::list<transaction::Variable *> *
|
||||
TimeYear::evaluate(Assay *assay) {
|
||||
std::list<transaction::Variable *> *resl =
|
||||
new std::list<transaction::Variable *>();
|
||||
|
||||
void TimeYear::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, "%Y", &timeinfo);
|
||||
|
||||
resl->push_back(new transaction::Variable("TIME_YEAR", std::string(tstr)));
|
||||
|
||||
return resl;
|
||||
l->push_back(new transaction::Variable("TIME_YEAR", std::string(tstr)));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user