IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
IBPP::Statement st = IBPP::StatementFactory(db, tr);
-string name;
+std::string name;
try
{
st->Get(1, schemaVersion);
}
tr->Commit();
- WriteServLog("FIREBIRD_STORE: Current DB schema version: %d", schemaVersion);
+ logger("FIREBIRD_STORE: Current DB schema version: %d", schemaVersion);
}
catch (IBPP::Exception & ex)
upload = ?, \
download = ? \
where fk_stat = ? and dir_num = ?");
- st->Set(1, (int64_t)stat.up[i]);
- st->Set(2, (int64_t)stat.down[i]);
+ st->Set(1, (int64_t)stat.monthUp[i]);
+ st->Set(2, (int64_t)stat.monthDown[i]);
st->Set(3, sid);
st->Set(4, i);
st->Execute();
if (st->Fetch())
{
st->Get(3, dir);
- st->Get(5, (int64_t &)stat->up[dir]);
- st->Get(4, (int64_t &)stat->down[dir]);
+ st->Get(5, (int64_t &)stat->monthUp[dir]);
+ st->Get(4, (int64_t &)stat->monthDown[dir]);
}
else
{
}
if (!ret)
{
- WriteServLog("MYSQL_STORE: Current DB schema version: %d", schemaVersion);
+ logger("MYSQL_STORE: Current DB schema version: %d", schemaVersion);
MakeUpdates(sock);
}
mysql_close(sock);
return -1;
}
schemaVersion = 1;
- WriteServLog("MYSQL_STORE: Updated DB schema to version %d", schemaVersion);
+ logger("MYSQL_STORE: Updated DB schema to version %d", schemaVersion);
}
return 0;
}
mysql_close(sock);
return -1;
}
- stat->down[i] = traff;
+ stat->monthDown[i] = traff;
sprintf(s, "U%d", i);
if (GetULongLongInt(row[startPos+i*2+1], &traff, 0) != 0)
mysql_close(sock);
return -1;
}
- stat->up[i] = traff;
+ stat->monthUp[i] = traff;
}//for
startPos += (2*DIR_NUM);
for (int i = 0; i < DIR_NUM; i++)
{
- strprintf(¶m, " D%d=%lld,", i, stat.down[i]);
+ strprintf(¶m, " D%d=%lld,", i, stat.monthDown[i]);
res += param;
- strprintf(¶m, " U%d=%lld,", i, stat.up[i]);
+ strprintf(¶m, " U%d=%lld,", i, stat.monthUp[i]);
res += param;
}
for (int i = 0; i < DIR_NUM; i++)
{
- strprintf(¶m, " U%d=%lld,", i, stat.up[i]);
+ strprintf(¶m, " U%d=%lld,", i, stat.monthUp[i]);
res += param;
- strprintf(¶m, " D%d=%lld,", i, stat.down[i]);
+ strprintf(¶m, " D%d=%lld,", i, stat.monthDown[i]);
res += param;
}