diff --git a/src/mint-lib/mint_api_refresh.c b/src/mint-lib/mint_api_refresh.c index e5e9b291b..294ca06e9 100644 --- a/src/mint-lib/mint_api_refresh.c +++ b/src/mint-lib/mint_api_refresh.c @@ -1438,11 +1438,15 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, json_array_append (melt_coins, melted_coin_to_json (&md->melt_session_hash, mc)); + } - /* now transfer_pubs */ + /* now transfer_pubs */ + for (j=0;jnum_melted_coins;i++) { + const struct MeltedCoin *mc = &md->melted_coins[i]; struct TALER_TransferPublicKeyP transfer_pub; GNUNET_CRYPTO_ecdhe_key_get_public (&mc->transfer_priv[j].ecdhe_priv, @@ -1453,11 +1457,15 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, } json_array_append (transfer_pubs, tmp); + } - /* now secret_encs */ + /* now secret_encs */ + for (j=0;jnum_melted_coins;i++) { + const struct MeltedCoin *mc = &md->melted_coins[i]; struct TALER_EncryptedLinkSecretP els; struct TALER_TransferSecretP trans_sec; @@ -1475,16 +1483,20 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, json_array_append (secret_encs, tmp); } + + /* now new_denoms */ for (i=0;inum_fresh_coins;i++) { - /* now new_denoms */ json_array_append (new_denoms, TALER_json_from_rsa_public_key (md->fresh_pks[i].rsa_public_key)); + } - /* now link_encs */ + /* now link_encs */ + for (j=0;jnum_fresh_coins;i++) { const struct FreshCoin *fc = &md->fresh_coins[j][i]; struct TALER_RefreshLinkDecrypted rld; @@ -1508,10 +1520,13 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, } json_array_append (link_encs, tmp); + } - /* now coin_evs */ + /* now coin_evs */ + for (j=0;jnum_fresh_coins;i++) { const struct FreshCoin *fc = &md->fresh_coins[j][i]; struct TALER_CoinSpendPublicKeyP coin_pub; @@ -1536,6 +1551,7 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint, json_array_append (coin_evs, tmp); } + /* finally, assemble main JSON request from constitutent arrays */ melt_obj = json_pack ("{s:o, s:o, s:o, s:o, s:o, s:o}", "new_denoms", new_denoms, diff --git a/src/mint/taler-mint-httpd_refresh.c b/src/mint/taler-mint-httpd_refresh.c index 687fb998d..d870f3a33 100644 --- a/src/mint/taler-mint-httpd_refresh.c +++ b/src/mint/taler-mint-httpd_refresh.c @@ -700,6 +700,7 @@ TMH_REFRESH_handler_refresh_melt (struct TMH_RequestHandler *rh, JSON_ARRAY, &coin_detail); if (GNUNET_OK != res) { + GNUNET_break_op (0); TMH_PARSE_release_data (spec); return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES; } @@ -711,6 +712,7 @@ TMH_REFRESH_handler_refresh_melt (struct TMH_RequestHandler *rh, JSON_ARRAY, &coin_detail); if (GNUNET_OK != res) { + GNUNET_break_op (0); TMH_PARSE_release_data (spec); return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES; }