summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_insert_deposit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-10-30 19:28:11 +0200
committerChristian Grothoff <christian@grothoff.org>2021-10-30 19:28:11 +0200
commit963a06c0aa9bba4dec67e41c442548141e5f6186 (patch)
tree7f2587f0d69f46103ce93805a58b2242c61d5dee /src/testing/testing_api_cmd_insert_deposit.c
parent55ea7fcb9aa5000a857ebdd2ba9b881ddc460a93 (diff)
downloadexchange-963a06c0aa9bba4dec67e41c442548141e5f6186.tar.gz
exchange-963a06c0aa9bba4dec67e41c442548141e5f6186.tar.bz2
exchange-963a06c0aa9bba4dec67e41c442548141e5f6186.zip
fix more FTBFS issues
Diffstat (limited to 'src/testing/testing_api_cmd_insert_deposit.c')
-rw-r--r--src/testing/testing_api_cmd_insert_deposit.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c
index 222ef758a..cc427ff5e 100644
--- a/src/testing/testing_api_cmd_insert_deposit.c
+++ b/src/testing/testing_api_cmd_insert_deposit.c
@@ -203,29 +203,12 @@ insert_deposit_run (void *cls,
deposit.coin.denom_sig.details.rsa_signature
= GNUNET_CRYPTO_rsa_sign_fdh (denom_priv,
&hc);
- {
- char *str;
- struct TALER_WireSalt salt;
-
- GNUNET_asprintf (&str,
- "payto://x-taler-bank/localhost/%s",
- ids->merchant_account);
- memset (&salt,
- 46,
- sizeof (salt));
- deposit.receiver_wire_account
- = GNUNET_JSON_PACK (
- GNUNET_JSON_pack_data_auto ("salt",
- &salt),
- GNUNET_JSON_pack_string ("payto_uri",
- str));
- GNUNET_free (str);
- }
-
- GNUNET_assert (GNUNET_OK ==
- TALER_JSON_merchant_wire_signature_hash (
- deposit.receiver_wire_account,
- &deposit.h_wire));
+ GNUNET_asprintf (&deposit.receiver_wire_account,
+ "payto://x-taler-bank/localhost/%s",
+ ids->merchant_account);
+ memset (&deposit.wire_salt,
+ 46,
+ sizeof (deposit.wire_salt));
deposit.timestamp = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&deposit.timestamp);
deposit.wire_deadline = GNUNET_TIME_relative_to_absolute (ids->wire_deadline);
@@ -247,14 +230,15 @@ insert_deposit_run (void *cls,
{
GNUNET_break (0);
ids->dbc->plugin->rollback (ids->dbc->plugin->cls);
+ GNUNET_free (deposit.receiver_wire_account);
TALER_TESTING_interpreter_fail (is);
+ return;
}
TALER_denom_sig_free (&deposit.coin.denom_sig);
TALER_denom_pub_free (&dpk);
GNUNET_CRYPTO_rsa_private_key_free (denom_priv);
- json_decref (deposit.receiver_wire_account);
-
+ GNUNET_free (deposit.receiver_wire_account);
TALER_TESTING_interpreter_next (is);
}