From 19e0b66f8780f97f15f0a40a739eb277244750f1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 26 Jun 2019 23:58:48 +0200 Subject: first steps on #5777 --- src/exchangedb/plugin_exchangedb_postgres.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/exchangedb/plugin_exchangedb_postgres.c') diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index a8b2e36c6..b4c2d49d8 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -3304,6 +3304,7 @@ postgres_get_known_coin (void *cls, const struct TALER_CoinSpendPublicKeyP *coin_pub, struct TALER_CoinPublicInfo *coin_info) { + struct PostgresClosure *pc = cls; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (coin_pub), GNUNET_PQ_query_param_end @@ -3320,6 +3321,8 @@ postgres_get_known_coin (void *cls, "Getting known coin data for coin %s\n", TALER_B2S (coin_pub)); coin_info->coin_pub = *coin_pub; + if (NULL == session) + session = postgres_get_session (pc); return GNUNET_PQ_eval_prepared_singleton_select (session->conn, "get_known_coin", params, -- cgit v1.2.3