[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -get batch withdraw to build
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -get batch withdraw to build |
Date: |
Sun, 01 May 2022 13:01:37 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 3d80b204 -get batch withdraw to build
3d80b204 is described below
commit 3d80b204595ce51cfcca36688017b041b0f875b9
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun May 1 13:01:32 2022 +0200
-get batch withdraw to build
---
contrib/gana | 2 +-
src/exchange/Makefile.am | 1 +
src/exchange/taler-exchange-httpd_batch-withdraw.c | 21 +++++++++------------
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/contrib/gana b/contrib/gana
index 0172bed4..625ae124 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 0172bed41a8fdfc4ef2511e311441120a3d2572d
+Subproject commit 625ae124ff4404702be49a06cf118ce0c7510d22
diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am
index e4d037e3..4d0caad8 100644
--- a/src/exchange/Makefile.am
+++ b/src/exchange/Makefile.am
@@ -79,6 +79,7 @@ taler_exchange_transfer_LDADD = \
taler_exchange_httpd_SOURCES = \
taler-exchange-httpd.c taler-exchange-httpd.h \
taler-exchange-httpd_auditors.c taler-exchange-httpd_auditors.h \
+ taler-exchange-httpd_batch-withdraw.c taler-exchange-httpd_batch-withdraw.h \
taler-exchange-httpd_contract.c taler-exchange-httpd_contract.h \
taler-exchange-httpd_csr.c taler-exchange-httpd_csr \
taler-exchange-httpd_db.c taler-exchange-httpd_db.h \
diff --git a/src/exchange/taler-exchange-httpd_batch-withdraw.c
b/src/exchange/taler-exchange-httpd_batch-withdraw.c
index a6302aad..a2bd1b7b 100644
--- a/src/exchange/taler-exchange-httpd_batch-withdraw.c
+++ b/src/exchange/taler-exchange-httpd_batch-withdraw.c
@@ -217,7 +217,7 @@ batch_withdraw_transaction (void *cls,
/* The reserve does not have the required amount (actual
* amount + withdraw fee) */
qs = TEH_plugin->get_reserve_history (TEH_plugin->cls,
- &wc->collectable.reserve_pub,
+ wc->reserve_pub,
&balance,
&rh);
if (NULL == rh)
@@ -303,7 +303,7 @@ batch_withdraw_transaction (void *cls,
: NULL;
qs = TEH_plugin->do_batch_withdraw_insert (TEH_plugin->cls,
nonce,
- &wc->collectable,
+ &pc->collectable,
now,
ruuid,
&denom_unknown,
@@ -334,7 +334,7 @@ batch_withdraw_transaction (void *cls,
"Idempotent coin in batch, not allowed. Aborting.\n");
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_CONFLICT,
-
TALER_EC_EXCHANGE_BATCH_IDEMPOTENT_PLANCHET,
+
TALER_EC_EXCHANGE_WITHDRAW_BATCH_IDEMPOTENT_PLANCHET,
NULL);
return GNUNET_DB_STATUS_HARD_ERROR;
}
@@ -560,10 +560,9 @@ parse_planchets (struct TEH_RequestContext *rc,
wc,
&mret))
{
- GNUNET_JSON_parse_free (spec);
return TEH_RESPONSE_reply_expired_denom_pub_hash (
rc->connection,
- &wc->collectable.denom_pub_hash,
+ &pc->collectable.denom_pub_hash,
TALER_EC_EXCHANGE_GENERIC_DENOMINATION_EXPIRED,
"WITHDRAW");
}
@@ -575,7 +574,7 @@ parse_planchets (struct TEH_RequestContext *rc,
for idempotency! */
return TEH_RESPONSE_reply_expired_denom_pub_hash (
rc->connection,
- &wc->collectable.denom_pub_hash,
+ &pc->collectable.denom_pub_hash,
TALER_EC_EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE,
"WITHDRAW");
}
@@ -588,13 +587,13 @@ parse_planchets (struct TEH_RequestContext *rc,
{
return TEH_RESPONSE_reply_expired_denom_pub_hash (
rc->connection,
- &wc->collectable.denom_pub_hash,
+ &pc->collectable.denom_pub_hash,
TALER_EC_EXCHANGE_GENERIC_DENOMINATION_REVOKED,
"WITHDRAW");
}
return mret;
}
- if (dk->denom_pub.cipher != wc->blinded_planchet.cipher)
+ if (dk->denom_pub.cipher != pc->blinded_planchet.cipher)
{
/* denomination cipher and blinded planchet cipher not the same */
return TALER_MHD_reply_with_error (rc->connection,
@@ -615,7 +614,7 @@ parse_planchets (struct TEH_RequestContext *rc,
if (0 >
TALER_amount_add (&wc->batch_total,
&wc->batch_total,
- pc->collectable.amount_with_fee))
+ &pc->collectable.amount_with_fee))
{
return TALER_MHD_reply_with_error (rc->connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
@@ -629,7 +628,6 @@ parse_planchets (struct TEH_RequestContext *rc,
&pc->collectable.h_coin_envelope))
{
GNUNET_break (0);
- GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (rc->connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE,
@@ -644,7 +642,6 @@ parse_planchets (struct TEH_RequestContext *rc,
&pc->collectable.reserve_sig))
{
GNUNET_break_op (0);
- GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (rc->connection,
MHD_HTTP_FORBIDDEN,
TALER_EC_EXCHANGE_WITHDRAW_RESERVE_SIGNATURE_INVALID,
@@ -720,7 +717,7 @@ TEH_handler_batch_withdraw (struct TEH_RequestContext *rc,
/* Clean up */
for (unsigned int i = 0; i<wc.planchets_length; i++)
{
- struct PlanchetContext *pc = &wc->planchets[i];
+ struct PlanchetContext *pc = &wc.planchets[i];
// FIXME: Free more of memory in pc!
TALER_blinded_denom_sig_free (&pc->collectable.sig);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: -get batch withdraw to build,
gnunet <=