#include "admins_impl.h"
#include "tariffs_impl.h"
#include "common.h"
-#include "traffcounter.h"
+#include "traffcounter_impl.h"
#include "plugin.h"
#include "stg_logger.h"
#include "stg_timer.h"
break;
default:
+ struct timespec ts = {0, 200000000};
for (int i = 0; i < 120 * 5; i++)
{
if (access(startFile.c_str(), F_OK) == 0)
unlink(startFile.c_str());
exit(1);
}
- usleep(200000);
+ nanosleep(&ts, NULL);
}
unlink(startFile.c_str());
exit(1);
TARIFFS_IMPL * tariffs = NULL;
ADMINS_IMPL * admins = NULL;
USERS_IMPL * users = NULL;
-TRAFFCOUNTER * traffCnt = NULL;
+TRAFFCOUNTER_IMPL * traffCnt = NULL;
int msgID = -11;
{
tariffs = new TARIFFS_IMPL(dataStore);
admins = new ADMINS_IMPL(dataStore);
users = new USERS_IMPL(settings, dataStore, tariffs, admins->GetSysAdmin());
-traffCnt = new TRAFFCOUNTER(users, tariffs, settings->GetRulesFileName());
+traffCnt = new TRAFFCOUNTER_IMPL(users, tariffs, settings->GetRulesFileName());
traffCnt->SetMonitorDir(settings->GetMonitorDir());
modSettings = settings->GetModulesSettings();