mirror of
https://github.com/WCBROW01/zblock.git
synced 2025-12-12 04:28:07 -05:00
[main.c] libpq will have status PGRES_TUPLES_OK when command is done
This commit is contained in:
4
main.c
4
main.c
@ -82,7 +82,9 @@ static void timer_retrieve_feeds(struct discord *client, struct discord_timer *t
|
|||||||
PGresult *database_res;
|
PGresult *database_res;
|
||||||
while ((database_res = PQgetResult(database_conn))) {
|
while ((database_res = PQgetResult(database_conn))) {
|
||||||
if (PQresultStatus(database_res) != PGRES_SINGLE_TUPLE) {
|
if (PQresultStatus(database_res) != PGRES_SINGLE_TUPLE) {
|
||||||
log_error("Unable to retrieve feed: %s", PQresultErrorMessage(database_res));
|
if (PQresultStatus(database_res) != PGRES_TUPLES_OK) {
|
||||||
|
log_error("Unable to retrieve feeds: %s", PQresultErrorMessage(database_res));
|
||||||
|
}
|
||||||
goto db_loop_end;
|
goto db_loop_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user