gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r38132 - gnunet/src/psycstore


From: gnunet
Subject: [GNUnet-SVN] r38132 - gnunet/src/psycstore
Date: Wed, 12 Oct 2016 18:41:36 +0200

Author: tg
Date: 2016-10-12 18:41:36 +0200 (Wed, 12 Oct 2016)
New Revision: 38132

Modified:
   gnunet/src/psycstore/plugin_psycstore_postgres.c
   gnunet/src/psycstore/test_plugin_psycstore_postgres.conf
Log:
psycstore/postgres: fix return value checks, use template1 db for tests

Modified: gnunet/src/psycstore/plugin_psycstore_postgres.c
===================================================================
--- gnunet/src/psycstore/plugin_psycstore_postgres.c    2016-10-12 16:41:34 UTC 
(rev 38131)
+++ gnunet/src/psycstore/plugin_psycstore_postgres.c    2016-10-12 16:41:36 UTC 
(rev 38132)
@@ -713,7 +713,7 @@
   if (GNUNET_OK !=
       GNUNET_POSTGRES_check_result (plugin->dbh,
                                     res,
-                                    PGRES_COMMAND_OK,
+                                    PGRES_TUPLES_OK,
                                     "PQexecPrepared", "select_membership"))
   {
     return GNUNET_SYSERR;
@@ -835,9 +835,9 @@
 
   res = GNUNET_PQ_exec_prepared (plugin->dbh, "update_message_flags", 
params_update);
   if (GNUNET_OK != GNUNET_POSTGRES_check_result (plugin->dbh,
-                                      res,
-                                      PGRES_COMMAND_OK,
-                                      "PQexecPrepared", 
"update_message_flags"))
+                                                 res,
+                                                 PGRES_COMMAND_OK,
+                                                 
"PQexecPrepared","update_message_flags"))
     return ret;
 
   PQclear (res);
@@ -952,7 +952,7 @@
   if (GNUNET_YES ==
       GNUNET_POSTGRES_check_result (plugin->dbh,
                                     res,
-                                    PGRES_COMMAND_OK,
+                                    PGRES_TUPLES_OK,
                                     "PQexecPrepared", stmt))
   {
     if (PQntuples (res) == 0)
@@ -1118,9 +1118,9 @@
 
   res = GNUNET_PQ_exec_prepared (plugin->dbh, stmt, params_select);
   if (GNUNET_OK == GNUNET_POSTGRES_check_result (plugin->dbh,
-                                      res,
-                                      PGRES_COMMAND_OK,
-                                      "PQexecPrepared", stmt))
+                                                 res,
+                                                 PGRES_TUPLES_OK,
+                                                 "PQexecPrepared", stmt))
   {
     if (PQntuples (res) == 0)
       ret = GNUNET_NO;
@@ -1159,9 +1159,9 @@
 
   res = GNUNET_PQ_exec_prepared (plugin->dbh, stmt, params_select);
   if (GNUNET_OK != GNUNET_POSTGRES_check_result (plugin->dbh,
-                                      res,
-                                      PGRES_COMMAND_OK,
-                                      "PQexecPrepared", stmt))
+                                                 res,
+                                                 PGRES_TUPLES_OK,
+                                                 "PQexecPrepared", stmt))
   {
     return GNUNET_SYSERR;
   }
@@ -1212,9 +1212,9 @@
 
   res = GNUNET_PQ_exec_prepared (plugin->dbh, stmt, params_select);
   if (GNUNET_OK != GNUNET_POSTGRES_check_result (plugin->dbh,
-                                      res,
-                                      PGRES_COMMAND_OK,
-                                      "PQexecPrepared", stmt))
+                                                 res,
+                                                 PGRES_TUPLES_OK,
+                                                 "PQexecPrepared", stmt))
   {
     return GNUNET_SYSERR;
   }
@@ -1261,9 +1261,9 @@
 
   res = GNUNET_PQ_exec_prepared (plugin->dbh, stmt, params);
   if (GNUNET_OK != GNUNET_POSTGRES_check_result (plugin->dbh,
-                                      res,
-                                      PGRES_COMMAND_OK,
-                                      "PQexecPrepared", stmt))
+                                                 res,
+                                                 PGRES_COMMAND_OK,
+                                                 "PQexecPrepared", stmt))
   {
     return GNUNET_SYSERR;
   }
@@ -1289,9 +1289,9 @@
 
   res = GNUNET_PQ_exec_prepared (plugin->dbh, stmt, params);
   if (GNUNET_OK != GNUNET_POSTGRES_check_result (plugin->dbh,
-                                      res,
-                                      PGRES_COMMAND_OK,
-                                      "PQexecPrepared", stmt))
+                                                 res,
+                                                 PGRES_COMMAND_OK,
+                                                 "PQexecPrepared", stmt))
   {
     return GNUNET_SYSERR;
   }
@@ -1529,9 +1529,9 @@
 
   res = GNUNET_PQ_exec_prepared (plugin->dbh, stmt, params_select);
   if (GNUNET_OK != GNUNET_POSTGRES_check_result (plugin->dbh,
-                                      res,
-                                      PGRES_COMMAND_OK,
-                                      "PQexecPrepared", stmt))
+                                                 res,
+                                                 PGRES_TUPLES_OK,
+                                                 "PQexecPrepared", stmt))
   {
     return GNUNET_SYSERR;
   }
@@ -1604,7 +1604,7 @@
     res = GNUNET_PQ_exec_prepared (plugin->dbh, stmt, params_select);
     if (GNUNET_OK != GNUNET_POSTGRES_check_result (plugin->dbh,
                                       res,
-                                      PGRES_COMMAND_OK,
+                                      PGRES_TUPLES_OK,
                                       "PQexecPrepared", stmt))
     {
       break;
@@ -1674,7 +1674,7 @@
     res = GNUNET_PQ_exec_prepared (plugin->dbh, stmt, params_select);
     if (GNUNET_OK != GNUNET_POSTGRES_check_result (plugin->dbh,
                                       res,
-                                      PGRES_COMMAND_OK,
+                                      PGRES_TUPLES_OK,
                                       "PQexecPrepared", stmt))
     {
       break;

Modified: gnunet/src/psycstore/test_plugin_psycstore_postgres.conf
===================================================================
--- gnunet/src/psycstore/test_plugin_psycstore_postgres.conf    2016-10-12 
16:41:34 UTC (rev 38131)
+++ gnunet/src/psycstore/test_plugin_psycstore_postgres.conf    2016-10-12 
16:41:36 UTC (rev 38132)
@@ -1,2 +1,2 @@
 [psycstore-postgres]
-CONFIG = connect_timeout=10; dbname=gnunet
+CONFIG = connect_timeout=10; dbname=template1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]