aboutsummaryrefslogtreecommitdiff
path: root/src/mintdb/plugin_mintdb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-12 10:46:42 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-12 10:46:42 +0200
commitfe6d7a5ae1b883f818538e1c0392624de5e88275 (patch)
treeab4f7a49c5755f1c3597e6d1a52f89ed4e8373b4 /src/mintdb/plugin_mintdb_postgres.c
parent3724e3d1660b4a9a31c2a7e30d51c3f1734cba89 (diff)
ensure DKI information is in database before we start to use it (#3808)
Diffstat (limited to 'src/mintdb/plugin_mintdb_postgres.c')
-rw-r--r--src/mintdb/plugin_mintdb_postgres.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c
index 144732087..b1dffc68c 100644
--- a/src/mintdb/plugin_mintdb_postgres.c
+++ b/src/mintdb/plugin_mintdb_postgres.c
@@ -1105,7 +1105,7 @@ postgres_insert_denomination_info (void *cls,
* @param cls the @e cls of this struct with the plugin-specific state
* @param sesssion connection to use
* @param denom_pub the public key used for signing coins of this denomination
- * @param[out] issue set to issue information with value, fees and other info about the coin
+ * @param[out] issue set to issue information with value, fees and other info about the coin, can be NULL
* @return #GNUNET_OK on success; #GNUNET_NO if no record was found, #GNUNET_SYSERR on failure
*/
static int
@@ -1121,7 +1121,7 @@ postgres_get_denomination_info (void *cls,
};
result = TALER_PQ_exec_prepared (session->conn,
- "reserve_get",
+ "denomination_get",
params);
if (PGRES_TUPLES_OK != PQresultStatus (result))
{
@@ -1140,6 +1140,11 @@ postgres_get_denomination_info (void *cls,
PQclear (result);
return GNUNET_SYSERR;
}
+ if (NULL == issue)
+ {
+ PQclear (result);
+ return GNUNET_OK;
+ }
{
struct TALER_PQ_ResultSpec rs[] = {
TALER_PQ_result_spec_auto_from_type ("master_pub",