Fix build due to revert error

This commit is contained in:
rubenwardy 2020-07-07 19:30:35 +01:00
parent ebb721a476
commit 42b0d612ef
2 changed files with 6 additions and 6 deletions

@ -678,7 +678,7 @@ void AuthDatabasePostgreSQL::initStatements()
bool AuthDatabasePostgreSQL::getAuth(const std::string &name, AuthEntry &res) bool AuthDatabasePostgreSQL::getAuth(const std::string &name, AuthEntry &res)
{ {
pingDatabase(); verifyDatabase();
const char *values[] = { name.c_str() }; const char *values[] = { name.c_str() };
PGresult *result = execPrepared("auth_read", 1, values, false, false); PGresult *result = execPrepared("auth_read", 1, values, false, false);
@ -710,7 +710,7 @@ bool AuthDatabasePostgreSQL::getAuth(const std::string &name, AuthEntry &res)
bool AuthDatabasePostgreSQL::saveAuth(const AuthEntry &authEntry) bool AuthDatabasePostgreSQL::saveAuth(const AuthEntry &authEntry)
{ {
pingDatabase(); verifyDatabase();
beginSave(); beginSave();
@ -732,7 +732,7 @@ bool AuthDatabasePostgreSQL::saveAuth(const AuthEntry &authEntry)
bool AuthDatabasePostgreSQL::createAuth(AuthEntry &authEntry) bool AuthDatabasePostgreSQL::createAuth(AuthEntry &authEntry)
{ {
pingDatabase(); verifyDatabase();
std::string lastLoginStr = itos(authEntry.last_login); std::string lastLoginStr = itos(authEntry.last_login);
const char *values[] = { const char *values[] = {
@ -764,7 +764,7 @@ bool AuthDatabasePostgreSQL::createAuth(AuthEntry &authEntry)
bool AuthDatabasePostgreSQL::deleteAuth(const std::string &name) bool AuthDatabasePostgreSQL::deleteAuth(const std::string &name)
{ {
pingDatabase(); verifyDatabase();
const char *values[] = { name.c_str() }; const char *values[] = { name.c_str() };
execPrepared("auth_delete", 1, values); execPrepared("auth_delete", 1, values);
@ -775,7 +775,7 @@ bool AuthDatabasePostgreSQL::deleteAuth(const std::string &name)
void AuthDatabasePostgreSQL::listNames(std::vector<std::string> &res) void AuthDatabasePostgreSQL::listNames(std::vector<std::string> &res)
{ {
pingDatabase(); verifyDatabase();
PGresult *results = execPrepared("auth_list_names", 0, PGresult *results = execPrepared("auth_list_names", 0,
NULL, NULL, NULL, false, false); NULL, NULL, NULL, false, false);

@ -152,7 +152,7 @@ public:
AuthDatabasePostgreSQL(const std::string &connect_string); AuthDatabasePostgreSQL(const std::string &connect_string);
virtual ~AuthDatabasePostgreSQL() = default; virtual ~AuthDatabasePostgreSQL() = default;
virtual void pingDatabase() { Database_PostgreSQL::pingDatabase(); } virtual void verifyDatabase() { Database_PostgreSQL::verifyDatabase(); }
virtual bool getAuth(const std::string &name, AuthEntry &res); virtual bool getAuth(const std::string &name, AuthEntry &res);
virtual bool saveAuth(const AuthEntry &authEntry); virtual bool saveAuth(const AuthEntry &authEntry);