From: Christian Grothoff Date: Fri, 17 Jan 2020 02:17:12 +0000 (+0100) Subject: fix X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=874a69b8f8a31eb5cc608c490478adc57681970b;p=oweals%2Fgnunet.git fix --- 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;