aboutsummaryrefslogtreecommitdiff
path: root/src/mint
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-08-09 21:38:04 +0200
committerChristian Grothoff <christian@grothoff.org>2015-08-09 21:38:04 +0200
commite08f479eb403cfbcb490dd0b07fd3d384136f446 (patch)
tree7bc8a39f4969048b232e43f2ad7200bf1a29672f /src/mint
parent6237981d9652889bbcc042e8b374c0addc65932f (diff)
-fix testcase, more verbose logging of client protocol errors
Diffstat (limited to 'src/mint')
-rw-r--r--src/mint/taler-mint-httpd_db.c8
-rw-r--r--src/mint/taler-mint-httpd_refresh.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/src/mint/taler-mint-httpd_db.c b/src/mint/taler-mint-httpd_db.c
index e24102ead..04c2555ec 100644
--- a/src/mint/taler-mint-httpd_db.c
+++ b/src/mint/taler-mint-httpd_db.c
@@ -550,7 +550,9 @@ refresh_accept_melts (struct MHD_Connection *connection,
GNUNET_break (0);
TMH_plugin->free_coin_transaction_list (TMH_plugin->cls,
tl);
- return TMH_RESPONSE_reply_internal_db_error (connection);
+ return (MHD_YES ==
+ TMH_RESPONSE_reply_internal_db_error (connection))
+ ? GNUNET_NO : GNUNET_SYSERR;
}
/* Refuse to refresh when the coin's value is insufficient
for the cost of all transactions. */
@@ -587,7 +589,9 @@ refresh_accept_melts (struct MHD_Connection *connection,
&melt))
{
GNUNET_break (0);
- return GNUNET_SYSERR;
+ return (MHD_YES ==
+ TMH_RESPONSE_reply_internal_db_error (connection))
+ ? GNUNET_NO : GNUNET_SYSERR;
}
return GNUNET_OK;
}
diff --git a/src/mint/taler-mint-httpd_refresh.c b/src/mint/taler-mint-httpd_refresh.c
index 954d8daf7..625fcc50c 100644
--- a/src/mint/taler-mint-httpd_refresh.c
+++ b/src/mint/taler-mint-httpd_refresh.c
@@ -92,6 +92,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection,
&cost,
&total_cost)) )
{
+ GNUNET_break_op (0);
TMH_KS_release (key_state);
return TMH_RESPONSE_reply_internal_error (connection,
"cost calculation failure");
@@ -115,6 +116,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection,
&coin_melt_details->melt_amount_with_fee,
&fee_melt))
{
+ GNUNET_break_op (0);
TMH_KS_release (key_state);
return TMH_RESPONSE_reply_external_error (connection,
"Melt contribution below melting fee");
@@ -124,6 +126,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection,
&melt,
&total_melt))
{
+ GNUNET_break_op (0);
TMH_KS_release (key_state);
return TMH_RESPONSE_reply_internal_error (connection,
"balance calculation failure");
@@ -134,6 +137,7 @@ handle_refresh_melt_binary (struct MHD_Connection *connection,
TALER_amount_cmp (&total_cost,
&total_melt))
{
+ GNUNET_break_op (0);
/* We require total value of coins being melted and
total value of coins being generated to match! */
return TMH_RESPONSE_reply_json_pack (connection,