From: Christian Grothoff Date: Mon, 24 Feb 2020 17:33:03 +0000 (+0100) Subject: fix return value X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4dc1dfc420503d432f7b3b7b50286e806e6f8b86;p=oweals%2Fgnunet.git fix return value --- diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c index a5a7f0682..2f017474b 100644 --- a/src/pq/pq_connect.c +++ b/src/pq/pq_connect.c @@ -236,7 +236,7 @@ GNUNET_PQ_run_sql (struct GNUNET_PQ_Context *db, i); if (GNUNET_YES != GNUNET_DISK_file_test (buf)) - return GNUNET_NO; /* We are done */ + return GNUNET_OK; /* We are done */ } /* Second, check with DB versioning schema if this patch was already applied, @@ -409,10 +409,13 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) } PQclear (res); - if (GNUNET_OK != + if (GNUNET_SYSERR == GNUNET_PQ_run_sql (db, db->load_path)) { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to load SQL statements from `%s'\n", + db->load_path); PQfinish (db->conn); db->conn = NULL; return;