From 4dc1dfc420503d432f7b3b7b50286e806e6f8b86 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 24 Feb 2020 18:33:03 +0100 Subject: [PATCH] fix return value --- src/pq/pq_connect.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.25.1