diff options
m--------- | contrib/wallet-core | 0 | ||||
m--------- | doc/prebuilt | 0 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_post-orders-ID-pay.c | 16 |
3 files changed, 5 insertions, 11 deletions
diff --git a/contrib/wallet-core b/contrib/wallet-core -Subproject ff583f2a346deedb385e481ef571fb1983eedf2 +Subproject a431332f59a8557edba64b24b8c6a6fcc140e2b diff --git a/doc/prebuilt b/doc/prebuilt -Subproject 300a469342ba879b16ff93aaaf170fa1b88e75f +Subproject 60ccf04bb3579c249a899c4ae88e120acda13c8 diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c index b60e2241..0efc03a6 100644 --- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c +++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c @@ -667,6 +667,7 @@ resume_pay_with_response (struct PayContext *pc, { TALER_EXCHANGE_batch_deposit_cancel (eg->bdh); eg->bdh = NULL; + pc->pending_at_eg--; } } GNUNET_assert (0 == pc->pending_at_eg); @@ -1152,11 +1153,11 @@ batch_deposit_cb ( struct PayContext *pc = eg->pc; eg->bdh = NULL; + pc->pending_at_eg--; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Batch deposit completed with status %u\n", dr->hr.http_status); GNUNET_assert (GNUNET_YES == pc->suspended); - pc->pending_at_eg--; switch (dr->hr.http_status) { case MHD_HTTP_OK: @@ -1255,6 +1256,7 @@ process_pay_with_keys ( unsigned int group_size; eg->fo = NULL; + pc->pending_at_eg--; GNUNET_SCHEDULER_begin_async_scope (&hc->async_scope_id); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Processing payment with exchange %s\n", @@ -1263,7 +1265,6 @@ process_pay_with_keys ( if (NULL == keys) { GNUNET_break_op (0); - pc->pending_at_eg--; resume_pay_with_error ( pc, TALER_EC_MERCHANT_GENERIC_EXCHANGE_TIMEOUT, @@ -1278,7 +1279,6 @@ process_pay_with_keys ( if (eg->tried_force_keys) { GNUNET_break_op (0); - pc->pending_at_eg--; resume_pay_with_error ( pc, TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_WIRE_METHOD_UNSUPPORTED, @@ -1296,7 +1296,6 @@ process_pay_with_keys ( { if (eg->tried_force_keys) { - pc->pending_at_eg--; GNUNET_break_op (0); resume_pay_with_error ( pc, @@ -1334,7 +1333,6 @@ process_pay_with_keys ( if (eg->tried_force_keys) { GNUNET_break_op (0); - pc->pending_at_eg--; resume_pay_with_response ( pc, MHD_HTTP_BAD_REQUEST, @@ -1360,7 +1358,6 @@ process_pay_with_keys ( { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Denomination key offered by client has expired for deposits\n"); - pc->pending_at_eg--; resume_pay_with_response ( pc, MHD_HTTP_GONE, @@ -1409,7 +1406,6 @@ AGE_FAIL: if (0 < code) { GNUNET_break_op (0); - pc->pending_at_eg--; GNUNET_free (dc->age_commitment.keys); resume_pay_with_response ( pc, @@ -1434,7 +1430,6 @@ AGE_FAIL: * with a coin that has age restriction enabled. We lack the hash * of the age commitment in this case in order to verify the coin * and to deposit it with the exchange. */ - pc->pending_at_eg--; GNUNET_break_op (0); resume_pay_with_response ( pc, @@ -1452,7 +1447,6 @@ AGE_FAIL: if (0 == group_size) { GNUNET_break (0); - pc->pending_at_eg--; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Group size zero, %u batch transactions remain pending\n", pc->pending_at_eg); @@ -1509,7 +1503,6 @@ AGE_FAIL: /* Signature was invalid or some other constraint was not satisfied. If the exchange was unavailable, we'd get that information in the callback. */ - pc->pending_at_eg--; GNUNET_break_op (0); resume_pay_with_response ( pc, @@ -1520,6 +1513,7 @@ AGE_FAIL: eg->exchange_url))); return; } + pc->pending_at_eg++; if (TMH_force_audit) TALER_EXCHANGE_batch_deposit_force_dc (eg->bdh); } @@ -1542,12 +1536,12 @@ force_keys (struct ExchangeGroup *eg) struct PayContext *pc = eg->pc; GNUNET_break (0); - pc->pending_at_eg--; resume_pay_with_error (pc, TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_LOOKUP_FAILED, "Failed to lookup exchange by URL"); return; } + pc->pending_at_eg++; } |