diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-26 23:58:48 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-27 00:04:20 +0200 |
commit | 19e0b66f8780f97f15f0a40a739eb277244750f1 (patch) | |
tree | 1823f46f36a74e7b54bbc4be4640eef5a95a666d /src/exchangedb/plugin_exchangedb_postgres.c | |
parent | 9a69fd81ed1eb5de13509f565947f01de8bdf38c (diff) | |
download | exchange-19e0b66f8780f97f15f0a40a739eb277244750f1.tar.xz |
first steps on #5777
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_postgres.c')
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 3 |
1 files changed, 3 insertions, 0 deletions
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, |