diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-08-08 21:46:26 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-08-08 21:46:26 +0200 |
commit | 189adf52eb96de135d531f53389ecce2d791268d (patch) | |
tree | 880e0c362ff5a9858e59a04625dd42188e640cb9 /src/mint-lib/mint_api_refresh.c | |
parent | 6ea5858d3276378dd3636ecc36ed312a0ccaee61 (diff) | |
download | exchange-189adf52eb96de135d531f53389ecce2d791268d.tar.xz |
finshing json parsing support for /refresh/melt handling
Diffstat (limited to 'src/mint-lib/mint_api_refresh.c')
-rw-r--r-- | src/mint-lib/mint_api_refresh.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mint-lib/mint_api_refresh.c b/src/mint-lib/mint_api_refresh.c index ede95af5b..3012957d6 100644 --- a/src/mint-lib/mint_api_refresh.c +++ b/src/mint-lib/mint_api_refresh.c @@ -1063,7 +1063,7 @@ verify_refresh_melt_signature_ok (struct TALER_MINT_RefreshMeltHandle *rmh, struct MAJ_Specification spec[] = { MAJ_spec_fixed_auto ("mint_sig", &mint_sig), MAJ_spec_fixed_auto ("mint_pub", &mint_sig), - // MAJ_spec_uint16 ("noreveal_index", noreveal_index), // FIXME! + MAJ_spec_uint16 ("noreveal_index", noreveal_index), MAJ_spec_end }; struct TALER_RefreshMeltConfirmationPS confirm; @@ -1124,7 +1124,7 @@ verify_refresh_melt_signature_forbidden (struct TALER_MINT_RefreshMeltHandle *rm struct TALER_CoinSpendPublicKeyP coin_pub; unsigned int i; struct MAJ_Specification spec[] = { - // MAJ_spec_json ("history", &history), // FIXME! + MAJ_spec_json ("history", &history), MAJ_spec_fixed_auto ("coin_pub", &coin_pub), MAJ_spec_amount ("original_value", &original_value), MAJ_spec_amount ("requested_value", &melt_value_with_fee), @@ -1165,6 +1165,7 @@ verify_refresh_melt_signature_forbidden (struct TALER_MINT_RefreshMeltHandle *rm { /* coin not found in our original request */ GNUNET_break_op (0); + json_decref (history); return GNUNET_SYSERR; } @@ -1174,6 +1175,7 @@ verify_refresh_melt_signature_forbidden (struct TALER_MINT_RefreshMeltHandle *rm { /* We disagree on the value of the coin */ GNUNET_break_op (0); + json_decref (history); return GNUNET_SYSERR; } if (0 != TALER_amount_cmp (&melt_value_with_fee, @@ -1181,6 +1183,7 @@ verify_refresh_melt_signature_forbidden (struct TALER_MINT_RefreshMeltHandle *rm { /* We disagree on the value of the coin */ GNUNET_break_op (0); + json_decref (history); return GNUNET_SYSERR; } @@ -1194,8 +1197,10 @@ verify_refresh_melt_signature_forbidden (struct TALER_MINT_RefreshMeltHandle *rm &total)) { GNUNET_break_op (0); + json_decref (history); return GNUNET_SYSERR; } + json_decref (history); /* check if melt operation was really too expensive given history */ if (GNUNET_OK != |