diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-02-24 18:33:03 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-02-24 18:33:03 +0100 |
commit | 4dc1dfc420503d432f7b3b7b50286e806e6f8b86 (patch) | |
tree | 3401cf73895deb4856d04f6a2b6f6e5b9513ebf8 /src/pq | |
parent | 201253c90a52864ad6100409ab19426a07257bf3 (diff) | |
download | gnunet-4dc1dfc420503d432f7b3b7b50286e806e6f8b86.tar.gz gnunet-4dc1dfc420503d432f7b3b7b50286e806e6f8b86.zip |
fix return value
Diffstat (limited to 'src/pq')
-rw-r--r-- | src/pq/pq_connect.c | 7 |
1 files 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, | |||
236 | i); | 236 | i); |
237 | if (GNUNET_YES != | 237 | if (GNUNET_YES != |
238 | GNUNET_DISK_file_test (buf)) | 238 | GNUNET_DISK_file_test (buf)) |
239 | return GNUNET_NO; /* We are done */ | 239 | return GNUNET_OK; /* We are done */ |
240 | } | 240 | } |
241 | 241 | ||
242 | /* Second, check with DB versioning schema if this patch was already applied, | 242 | /* Second, check with DB versioning schema if this patch was already applied, |
@@ -409,10 +409,13 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) | |||
409 | } | 409 | } |
410 | PQclear (res); | 410 | PQclear (res); |
411 | 411 | ||
412 | if (GNUNET_OK != | 412 | if (GNUNET_SYSERR == |
413 | GNUNET_PQ_run_sql (db, | 413 | GNUNET_PQ_run_sql (db, |
414 | db->load_path)) | 414 | db->load_path)) |
415 | { | 415 | { |
416 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
417 | "Failed to load SQL statements from `%s'\n", | ||
418 | db->load_path); | ||
416 | PQfinish (db->conn); | 419 | PQfinish (db->conn); |
417 | db->conn = NULL; | 420 | db->conn = NULL; |
418 | return; | 421 | return; |