summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-04 22:00:29 +0200
committerChristian Grothoff <christian@grothoff.org>2015-07-04 22:00:29 +0200
commit902ec2fe11974c7846d99300d10e24eee2ba92e4 (patch)
tree0fef91c48958f76a8220a9bac7cebf8075de0f03
parent915270d77a6f176caae2660f53c8ac9f908156ef (diff)
downloadexchange-902ec2fe11974c7846d99300d10e24eee2ba92e4.tar.gz
exchange-902ec2fe11974c7846d99300d10e24eee2ba92e4.tar.bz2
exchange-902ec2fe11974c7846d99300d10e24eee2ba92e4.zip
implementing missing interpreter shutdown cleanup logic
-rw-r--r--src/mint-lib/test_mint_api.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c
index 97e2eb8f0..1e7246000 100644
--- 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,