X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/1b2ab8e6d556a8ed30d4feadc72263b3f4c86665..29895f4c7abb19a67b0ede58ae4f7d403023e171:/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp index 3331a07d..b990300c 100644 --- a/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp +++ b/projects/stargazer/plugins/store/postgresql/postgresql_store_users.cpp @@ -564,7 +564,7 @@ if (PQresultStatus(result) != PGRES_COMMAND_OK) PQclear(result); -if (SaveUserServices(uid, conf.service)) +if (SaveUserServices(uid, conf.services)) { printfd(__FILE__, "POSTGRESQL_STORE::SaveUserConf(): 'Failed to save user's services'\n"); if (RollbackTransaction()) @@ -883,7 +883,7 @@ tuples = PQntuples(result); for (int i = 0; i < tuples; ++i) { - conf->service.push_back(PQgetvalue(result, i, 0)); + conf->services.push_back(PQgetvalue(result, i, 0)); } PQclear(result); @@ -1369,8 +1369,6 @@ if (PQstatus(connection) != CONNECTION_OK) } } -PGresult * result; - if (StartTransaction()) { printfd(__FILE__, "POSTGRESQL_STORE::WriteDetailedStat(): 'Failed to start transaction'\n"); @@ -1408,7 +1406,7 @@ for (it = statTree.begin(); it != statTree.end(); ++it) << 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) {