aboutsummaryrefslogtreecommitdiff
path: root/src/pq
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-02-03 23:51:09 +0100
committerChristian Grothoff <christian@grothoff.org>2020-02-03 23:51:09 +0100
commite3dcec36a06dec9ca7b8f4f43ff247633167d3df (patch)
tree13009b2100fe79c1f8119c2d732159cc56d567fb /src/pq
parent1bba6bc1221a64d97f593fc673b947ab5a7dfc54 (diff)
downloadgnunet-e3dcec36a06dec9ca7b8f4f43ff247633167d3df.tar.gz
gnunet-e3dcec36a06dec9ca7b8f4f43ff247633167d3df.zip
fix bug *AGAIN*, could swear I fixed this one before... strange
Diffstat (limited to 'src/pq')
-rw-r--r--src/pq/pq_connect.c14
1 files changed, 7 insertions, 7 deletions
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
147GNUNET_PQ_run_sql (struct GNUNET_PQ_Context *db, 147GNUNET_PQ_run_sql (struct GNUNET_PQ_Context *db,
148 const char *load_path) 148 const char *load_path)
149{ 149{
150 size_t slen = strlen (db->load_path) + 10; 150 size_t slen = strlen (load_path) + 10;
151 151
152 for (unsigned int i = 0; i<10000; i++) 152 for (unsigned int i = 0; i<10000; i++)
153 { 153 {
@@ -155,11 +155,11 @@ GNUNET_PQ_run_sql (struct GNUNET_PQ_Context *db,
155 struct GNUNET_OS_Process *psql; 155 struct GNUNET_OS_Process *psql;
156 enum GNUNET_OS_ProcessStatusType type; 156 enum GNUNET_OS_ProcessStatusType type;
157 unsigned long code; 157 unsigned long code;
158 158
159 GNUNET_snprintf (buf, 159 GNUNET_snprintf (buf,
160 sizeof (buf), 160 sizeof (buf),
161 "%s%04u.sql", 161 "%s%04u.sql",
162 db->load_path, 162 load_path,
163 i); 163 i);
164 if (GNUNET_YES != 164 if (GNUNET_YES !=
165 GNUNET_DISK_file_test (buf)) 165 GNUNET_DISK_file_test (buf))
@@ -251,10 +251,10 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db)
251 &pq_notice_processor_cb, 251 &pq_notice_processor_cb,
252 db); 252 db);
253 if ( (NULL != db->load_path) && 253 if ( (NULL != db->load_path) &&
254 (GNUNET_OK != 254 (GNUNET_OK !=
255 GNUNET_PQ_run_sql (db, 255 GNUNET_PQ_run_sql (db,
256 db->load_path)) ) 256 db->load_path)) )
257 { 257 {
258 PQfinish (db->conn); 258 PQfinish (db->conn);
259 db->conn = NULL; 259 db->conn = NULL;
260 return; 260 return;