From e3dcec36a06dec9ca7b8f4f43ff247633167d3df Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 3 Feb 2020 23:51:09 +0100 Subject: fix bug *AGAIN*, could swear I fixed this one before... strange --- contrib/build-common | 2 +- src/pq/pq_connect.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/build-common b/contrib/build-common index d81bbfabc..1915a74bb 160000 --- a/contrib/build-common +++ b/contrib/build-common @@ -1 +1 @@ -Subproject commit d81bbfabc2538932f631d3946bd6a9b95182b4f2 +Subproject commit 1915a74bbb4cd2ae9bc541a382dfebc37064a2fd diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c index 31ee59b51..cc064f48d 100644 --- a/src/pq/pq_connect.c +++ b/src/pq/pq_connect.c @@ -147,7 +147,7 @@ int GNUNET_PQ_run_sql (struct GNUNET_PQ_Context *db, const char *load_path) { - size_t slen = strlen (db->load_path) + 10; + size_t slen = strlen (load_path) + 10; for (unsigned int i = 0; i<10000; i++) { @@ -155,11 +155,11 @@ GNUNET_PQ_run_sql (struct GNUNET_PQ_Context *db, struct GNUNET_OS_Process *psql; enum GNUNET_OS_ProcessStatusType type; unsigned long code; - + GNUNET_snprintf (buf, sizeof (buf), "%s%04u.sql", - db->load_path, + load_path, i); if (GNUNET_YES != GNUNET_DISK_file_test (buf)) @@ -251,10 +251,10 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) &pq_notice_processor_cb, db); if ( (NULL != db->load_path) && - (GNUNET_OK != - GNUNET_PQ_run_sql (db, - db->load_path)) ) - { + (GNUNET_OK != + GNUNET_PQ_run_sql (db, + db->load_path)) ) + { PQfinish (db->conn); db->conn = NULL; return; -- cgit v1.2.3