fix bug *AGAIN*, could swear I fixed this one before... strange
authorChristian Grothoff <christian@grothoff.org>
Mon, 3 Feb 2020 22:51:09 +0000 (23:51 +0100)
committerChristian Grothoff <christian@grothoff.org>
Mon, 3 Feb 2020 22:51:09 +0000 (23:51 +0100)
contrib/build-common
src/pq/pq_connect.c

index d81bbfabc2538932f631d3946bd6a9b95182b4f2..1915a74bbb4cd2ae9bc541a382dfebc37064a2fd 160000 (submodule)
@@ -1 +1 @@
-Subproject commit d81bbfabc2538932f631d3946bd6a9b95182b4f2
+Subproject commit 1915a74bbb4cd2ae9bc541a382dfebc37064a2fd
index 31ee59b514b9b501567f3b076f01a29869ffc4f1..cc064f48d3f58ff2b73c7bf36a69580936bce8d8 100644 (file)
@@ -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;