summaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-05 16:32:15 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 16:50:51 +0200
commit6eb32a65bf67438159fb1b6e3cf404b8721784ee (patch)
tree9fee232fe54f0b5dba13d1413f6ee063dae08f97 /src/exchangedb
parent49f466df401259248c5d187374655492d4b4eec7 (diff)
downloadexchange-6eb32a65bf67438159fb1b6e3cf404b8721784ee.tar.gz
exchange-6eb32a65bf67438159fb1b6e3cf404b8721784ee.tar.bz2
exchange-6eb32a65bf67438159fb1b6e3cf404b8721784ee.zip
fix error reporting/handling
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 93577feb4..641cbbef1 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -1812,8 +1812,12 @@ postgres_iterate_denomination_info (void *cls,
.cb_cls = cb_cls,
.pg = pc
};
+ struct TALER_EXCHANGEDB_Session *session;
- return GNUNET_PQ_eval_prepared_multi_select (postgres_get_session (pc)->conn,
+ session = postgres_get_session (pc);
+ if (NULL == session)
+ return GNUNET_DB_STATUS_HARD_ERROR;
+ return GNUNET_PQ_eval_prepared_multi_select (session->conn,
"denomination_iterate",
params,
&domination_cb_helper,
@@ -3068,6 +3072,8 @@ postgres_get_known_coin (void *cls,
coin_info->coin_pub = *coin_pub;
if (NULL == session)
session = postgres_get_session (pc);
+ if (NULL == session)
+ return GNUNET_DB_STATUS_HARD_ERROR;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"get_known_coin",
params,
@@ -3107,6 +3113,8 @@ postgres_get_coin_denomination (
TALER_B2S (coin_pub));
if (NULL == session)
session = postgres_get_session (pc);
+ if (NULL == session)
+ return GNUNET_DB_STATUS_HARD_ERROR;
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"get_coin_denomination",
params,
@@ -3475,6 +3483,8 @@ postgres_get_melt (void *cls,
melt->session.coin.denom_sig.rsa_signature = NULL;
if (NULL == session)
session = postgres_get_session (pg);
+ if (NULL == session)
+ return GNUNET_DB_STATUS_HARD_ERROR;
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
"get_melt",
params,