diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-06 20:54:42 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-06 20:54:42 +0200 |
commit | dbab0c658734c14436a89bd7fc76b295cbcf5448 (patch) | |
tree | 45c76147c8da84a4a9911803fca54744aa36725a /src/exchange/taler-exchange-httpd_payback.c | |
parent | 2f715c27f82584cb65855785144877da628fe35c (diff) | |
download | exchange-dbab0c658734c14436a89bd7fc76b295cbcf5448.tar.gz exchange-dbab0c658734c14436a89bd7fc76b295cbcf5448.tar.bz2 exchange-dbab0c658734c14436a89bd7fc76b295cbcf5448.zip |
check return value from TALER_amount_get_zero
Diffstat (limited to 'src/exchange/taler-exchange-httpd_payback.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_payback.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-httpd_payback.c b/src/exchange/taler-exchange-httpd_payback.c index 8b4051cb7..d8e1dd8ff 100644 --- a/src/exchange/taler-exchange-httpd_payback.c +++ b/src/exchange/taler-exchange-httpd_payback.c @@ -115,7 +115,7 @@ struct PaybackContext * Details about the coin. */ const struct TALER_CoinPublicInfo *coin; - + /** * Key used to blind the coin. */ @@ -174,7 +174,7 @@ payback_transaction (void *cls, struct TALER_EXCHANGEDB_TransactionList *tl; struct TALER_Amount spent; enum GNUNET_DB_QueryStatus qs; - + /* Check whether a payback is allowed, and if so, to which reserve / account the money should go */ qs = TEH_plugin->get_reserve_by_h_blind (TEH_plugin->cls, @@ -214,8 +214,9 @@ payback_transaction (void *cls, } return qs; } - TALER_amount_get_zero (pc->value.currency, - &spent); + GNUNET_assert (GNUNET_OK == + TALER_amount_get_zero (pc->value.currency, + &spent)); if (GNUNET_OK != TEH_DB_calculate_transaction_list_totals (tl, &spent, @@ -386,7 +387,7 @@ verify_and_execute_payback (struct MHD_Connection *connection, &payback_transaction, &pc)) return mhd_ret; - + return reply_payback_success (connection, &coin->coin_pub, &pc.reserve_pub, |