pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
{
STG_LOCKER lock(&mutex, __FILE__, __LINE__);
time_t tt = stgTime - 3600;
{
STG_LOCKER lock(&mutex, __FILE__, __LINE__);
time_t tt = stgTime - 3600;
-if (store->SaveMonthStat(stat, t1->tm_mon, t1->tm_year, login))
+if (store->SaveMonthStat(stat, t1.tm_mon, t1.tm_year, login))
{
WriteServLog("Cannot write month stat for user %s.", login.c_str());
WriteServLog("%s", store->GetStrError().c_str());
{
WriteServLog("Cannot write month stat for user %s.", login.c_str());
WriteServLog("%s", store->GetStrError().c_str());
static int daysInMonth[12] =
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
static int daysInMonth[12] =
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};