//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::GetUsersList(std::vector<std::string> * usersList) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::AddUser(const std::string & name) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::DelUser(const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
int POSTGRESQL_STORE::SaveUserStat(const USER_STAT & stat,
const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
return SaveStat(stat, login);
}
int POSTGRESQL_STORE::SaveUserConf(const USER_CONF & conf,
const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
int POSTGRESQL_STORE::RestoreUserStat(USER_STAT * stat,
const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
int POSTGRESQL_STORE::RestoreUserConf(USER_CONF * conf,
const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
const std::string & newValue,
const std::string & message = "") const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::WriteUserConnect(const std::string & login, uint32_t ip) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
double freeMb,
const std::string & reason) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
time_t lastStat,
const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
if (PQstatus(connection) != CONNECTION_OK)
{
}
}
-PGresult * result;
-
if (StartTransaction())
{
printfd(__FILE__, "POSTGRESQL_STORE::WriteDetailedStat(): 'Failed to start transaction'\n");
<< it->second.up << ", "
<< it->second.cash << ")";
- result = PQexec(connection, query.str().c_str());
+ PGresult * result = PQexec(connection, query.str().c_str());
if (PQresultStatus(result) != PGRES_COMMAND_OK)
{
//-----------------------------------------------------------------------------
int POSTGRESQL_STORE::SaveMonthStat(const USER_STAT & stat, int month, int year, const std::string & login) const
{
-STG_LOCKER lock(&mutex, __FILE__, __LINE__);
+STG_LOCKER lock(&mutex);
return SaveStat(stat, login, year, month);
}