- snprintf(dirName, 3, "U%d", i);
- s.WriteInt(dirName, stat.up[i]);
- snprintf(dirName, 3, "D%d", i);
- s.WriteInt(dirName, stat.down[i]);
+ STG_LOCKER lock(&mutex);
+ errorStr = "Cannot create file '" + stat2 + "'";
+ printfd(__FILE__, "FILES_STORE::SaveMonthStat - month stat write failed for user '%s'\n", login.c_str());
+ return -1;
+ }
+
+for (size_t i = 0; i < DIR_NUM; i++)
+ {
+ char dirName[3];
+ snprintf(dirName, 3, "U%llu", (unsigned long long)i);
+ s.WriteInt(dirName, stat.monthUp[i]); // Classic
+ s2.WriteInt(dirName, stat.monthUp[i]); // New
+ snprintf(dirName, 3, "D%llu", (unsigned long long)i);
+ s.WriteInt(dirName, stat.monthDown[i]); // Classic
+ s2.WriteInt(dirName, stat.monthDown[i]); // New