diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-21 14:21:00 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-21 14:21:00 +0100 |
commit | f7025fd6303b754f601bccf0c01272cf35e0b991 (patch) | |
tree | 6690c9de3a5cd57e3f14bf1a3df0b0bbcee89634 /src/mint/plugin_mintdb_postgres.c | |
parent | 067d4891411f7add6256352e661aab9fb0b58266 (diff) | |
download | exchange-f7025fd6303b754f601bccf0c01272cf35e0b991.tar.xz |
fix testcase FTBFS
Diffstat (limited to 'src/mint/plugin_mintdb_postgres.c')
-rw-r--r-- | src/mint/plugin_mintdb_postgres.c | 10 |
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; |