X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/bc4929f4d2f051277f116d6d582ccdb371f27595..15c40aa2f808c1d48aab717636238aea13880f88:/projects/stargazer/users.cpp diff --git a/projects/stargazer/users.cpp b/projects/stargazer/users.cpp index 068193ef..e2f326e0 100644 --- a/projects/stargazer/users.cpp +++ b/projects/stargazer/users.cpp @@ -144,7 +144,7 @@ if (store->AddUser(login)) USER u(settings, store, tariffs, sysAdmin, &ipIndex); -struct tm * tms; +/*struct tm * tms; time_t t = stgTime; tms = localtime(&t); @@ -156,7 +156,7 @@ tms->tm_sec = 0; if (settings->GetDayResetTraff() > tms->tm_mday) tms->tm_mon -= 1; -tms->tm_mday = settings->GetDayResetTraff(); +tms->tm_mday = settings->GetDayResetTraff();*/ u.SetLogin(login); @@ -489,7 +489,13 @@ if (isRunning) printfd(__FILE__, "Before USERS::Run()\n"); for_each(users.begin(), users.end(), mem_fun_ref(&USER::Run)); -for_each(users.begin(), users.end(), bind2nd(mem_fun_ref(&USER::WriteDetailStat), true)); + +// 'cause bind2st accepts only constant first param +for (list::iterator it = users.begin(); + it != users.end(); + ++it) + it->WriteDetailStat(true); + for_each(users.begin(), users.end(), mem_fun_ref(&USER::WriteStat)); for_each(users.begin(), users.end(), mem_fun_ref(&USER::WriteConf));