From: Christian Grothoff Date: Mon, 3 Feb 2020 22:51:09 +0000 (+0100) Subject: fix bug *AGAIN*, could swear I fixed this one before... strange X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e3dcec36a06dec9ca7b8f4f43ff247633167d3df;p=oweals%2Fgnunet.git fix bug *AGAIN*, could swear I fixed this one before... strange --- 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;