exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 902ec2fe11974c7846d99300d10e24eee2ba92e4
parent 915270d77a6f176caae2660f53c8ac9f908156ef
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  4 Jul 2015 22:00:29 +0200

implementing missing interpreter shutdown cleanup logic

Diffstat:
Msrc/mint-lib/test_mint_api.c | 30++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c @@ -166,6 +166,11 @@ struct Command */ struct TALER_CoinSpendPrivateKeyP coin_priv; + /** + * Withdraw handle (while operation is running). + */ + struct TALER_MINT_WithdrawSignHandle *wsh; + } withdraw_sign; struct @@ -209,6 +214,11 @@ struct Command */ struct TALER_MerchantPublicKeyP merchant_priv; + /** + * Deposit handle while operation is running. + */ + struct TALER_MINT_DepositHandle *dh; + } deposit; } details; @@ -495,10 +505,26 @@ do_shutdown (void *cls, } break; case OC_WITHDRAW_SIGN: - GNUNET_break (0); // not implemented + if (NULL != cmd->details.withdraw_sign.wsh) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Command %u (%s) did not complete\n", + i, + cmd->label); + TALER_MINT_withdraw_sign_cancel (cmd->details.withdraw_sign.wsh); + cmd->details.withdraw_sign.wsh = NULL; + } break; case OC_DEPOSIT: - GNUNET_break (0); // not implemented + if (NULL != cmd->details.deposit.dh) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Command %u (%s) did not complete\n", + i, + cmd->label); + TALER_MINT_deposit_cancel (cmd->details.deposit.dh); + cmd->details.deposit.dh = NULL; + } break; default: GNUNET_log (GNUNET_ERROR_TYPE_ERROR,