#include "stg/common.h"
#include "stg/locker.h"
+#include "stg/const.h" // MONITOR_TIME_DELAY_SEC
#include "traffcounter_impl.h"
#include "stg_timer.h"
#include "users_impl.h"
rulesFileName(fn),
monitorDir(),
monitoring(false),
+ touchTimeP(stgTime - MONITOR_TIME_DELAY_SEC),
users(u),
running(false),
stopped(true),
if (!running)
return;
-time_t touchTime = stgTime - MONITOR_TIME_DELAY_SEC;
-
-if (monitoring && (touchTime + MONITOR_TIME_DELAY_SEC <= stgTime))
+if (monitoring && (touchTimeP + MONITOR_TIME_DELAY_SEC <= stgTime))
{
std::string monFile = monitorDir + "/traffcounter_p";
printfd(__FILE__, "Monitor=%d file TRAFFCOUNTER %s\n", monitoring, monFile.c_str());
- touchTime = stgTime;
+ touchTimeP = stgTime;
TouchFile(monFile.c_str());
}
FreeRules();
ReadRules();
-printfd(__FILE__, "TRAFFCOUNTER_IMPL::Reload() - Reload rules successfull.\n");
-WriteServLog("TRAFFCOUNTER: Reload rules successfull.");
+printfd(__FILE__, "TRAFFCOUNTER_IMPL::Reload() - Reloaded rules successfully.\n");
+WriteServLog("TRAFFCOUNTER: Reloaded rules successfully.");
return 0;
}
//-----------------------------------------------------------------------------