From 874a69b8f8a31eb5cc608c490478adc57681970b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 17 Jan 2020 03:17:12 +0100 Subject: [PATCH] fix --- src/pq/pq_connect.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c index d1b1ee33b..724971bd7 100644 --- a/src/pq/pq_connect.c +++ b/src/pq/pq_connect.c @@ -194,18 +194,19 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) GNUNET_snprintf (buf, sizeof (buf), - "%s/%u.sql", + "%s/%04u.sql", db->load_path, i); if (GNUNET_YES != GNUNET_DISK_file_test (buf)) break; /* We are done */ psql = GNUNET_OS_start_process (GNUNET_NO, - GNUNET_OS_INHERIT_STD_NONE, + GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, "psql", + "psql", db->config_str, "-f", buf, @@ -228,9 +229,10 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) if ( (GNUNET_OS_PROCESS_EXITED != type) || (0 != code) ) { - GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, - "psql", - buf); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Could not run PSQL on file %s: %d", + buf, + (int) code); PQfinish (db->conn); db->conn = NULL; return; -- 2.25.1