summaryrefslogtreecommitdiff
path: root/src/mint/plugin_mintdb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-03-21 14:21:00 +0100
committerChristian Grothoff <christian@grothoff.org>2015-03-21 14:21:00 +0100
commitf7025fd6303b754f601bccf0c01272cf35e0b991 (patch)
tree6690c9de3a5cd57e3f14bf1a3df0b0bbcee89634 /src/mint/plugin_mintdb_postgres.c
parent067d4891411f7add6256352e661aab9fb0b58266 (diff)
downloadexchange-f7025fd6303b754f601bccf0c01272cf35e0b991.tar.gz
exchange-f7025fd6303b754f601bccf0c01272cf35e0b991.tar.bz2
exchange-f7025fd6303b754f601bccf0c01272cf35e0b991.zip
fix testcase FTBFS
Diffstat (limited to 'src/mint/plugin_mintdb_postgres.c')
-rw-r--r--src/mint/plugin_mintdb_postgres.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mint/plugin_mintdb_postgres.c b/src/mint/plugin_mintdb_postgres.c
index 8935fe039..078e6e1ba 100644
--- a/src/mint/plugin_mintdb_postgres.c
+++ b/src/mint/plugin_mintdb_postgres.c
@@ -148,14 +148,15 @@ postgres_drop_temporary (void *cls,
/**
* Create the necessary tables if they are not present
*
- * @param pc our overall context
+ * @param cls the `struct PostgresClosure` with the plugin-specific state
* @param temporary should we use a temporary schema
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
*/
static int
-postgres_create_tables (struct PostgresClosure *pc,
+postgres_create_tables (void *cls,
int temporary)
{
+ struct PostgresClosure *pc = cls;
PGresult *result;
PGconn *conn;
@@ -168,8 +169,8 @@ postgres_create_tables (struct PostgresClosure *pc,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- if ((GNUNET_YES == temporary)
- && (GNUNET_SYSERR == set_temporary_schema (conn)))
+ if ( (GNUNET_YES == temporary) &&
+ (GNUNET_SYSERR == set_temporary_schema (conn)))
{
PQfinish (conn);
return GNUNET_SYSERR;
@@ -287,6 +288,7 @@ postgres_create_tables (struct PostgresClosure *pc,
",wire TEXT NOT NULL"
")");
#undef SQLEXEC
+
PQfinish (conn);
return GNUNET_OK;