summaryrefslogtreecommitdiff
path: root/src/exchangedb/plugin_exchangedb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-22 18:13:46 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-22 18:13:46 +0100
commita644355c44ec08c6e0691c8e308bba69619fdccd (patch)
treeb9b2deb85999a803483805076cf7dcd27758a0f6 /src/exchangedb/plugin_exchangedb_postgres.c
parentf17d886753fae3148afbfd3e267da30548f71ad4 (diff)
downloadexchange-a644355c44ec08c6e0691c8e308bba69619fdccd.tar.gz
exchange-a644355c44ec08c6e0691c8e308bba69619fdccd.tar.bz2
exchange-a644355c44ec08c6e0691c8e308bba69619fdccd.zip
address FIXME: pass session when iterating over denominations
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index bc3b292a..43b927c2 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -2004,12 +2004,14 @@ domination_cb_helper (void *cls,
* Fetch information about all known denomination keys.
*
* @param cls the @e cls of this struct with the plugin-specific state
+ * @param session connection to use
* @param cb function to call on each denomination key
* @param cb_cls closure for @a cb
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
postgres_iterate_denomination_info (void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
TALER_EXCHANGEDB_DenominationCallback cb,
void *cb_cls)
{
@@ -2022,9 +2024,9 @@ postgres_iterate_denomination_info (void *cls,
.cb_cls = cb_cls,
.pg = pc
};
- struct TALER_EXCHANGEDB_Session *session;
- session = postgres_get_session (pc);
+ if (NULL == session)
+ session = postgres_get_session (pc);
if (NULL == session)
return GNUNET_DB_STATUS_HARD_ERROR;
return GNUNET_PQ_eval_prepared_multi_select (session->conn,