summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_post-orders-ID-pay.c')
-rw-r--r--src/backend/taler-merchant-httpd_post-orders-ID-pay.c12
1 files changed, 6 insertions, 6 deletions
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 682900b4..ee29b9c6 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -397,7 +397,7 @@ get_pay_timeout (unsigned int num_coins)
* @param pc pay context to abort
*/
static void
-abort_deposit (struct PayContext *pc)
+abort_active_deposits (struct PayContext *pc)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Aborting pending /deposit operations\n");
@@ -425,7 +425,7 @@ TMH_force_pc_resume ()
NULL != pc;
pc = pc->next)
{
- abort_deposit (pc);
+ abort_active_deposits (pc);
if (NULL != pc->timeout_task)
{
GNUNET_SCHEDULER_cancel (pc->timeout_task);
@@ -454,7 +454,7 @@ resume_pay_with_response (struct PayContext *pc,
unsigned int response_code,
struct MHD_Response *response)
{
- abort_deposit (pc);
+ abort_active_deposits (pc);
pc->response_code = response_code;
pc->response = response;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -508,7 +508,7 @@ pay_context_cleanup (void *cls)
GNUNET_SCHEDULER_cancel (pc->timeout_task);
pc->timeout_task = NULL;
}
- abort_deposit (pc);
+ abort_active_deposits (pc);
for (unsigned int i = 0; i<pc->coins_cnt; i++)
{
struct DepositConfirmation *dc = &pc->dc[i];
@@ -1010,6 +1010,7 @@ check_coin_paid (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Deposit of coin `%s' already in our DB.\n",
TALER_B2S (coin_pub));
+
GNUNET_assert (0 <=
TALER_amount_add (&pc->total_paid,
&pc->total_paid,
@@ -1056,8 +1057,7 @@ check_coin_refunded (void *cls,
for (unsigned int i = 0; i<pc->coins_cnt; i++)
{
struct DepositConfirmation *dc = &pc->dc[i];
-
- /* Get matching coin from results*/
+ /* Get matching coins from results. */
if (0 != GNUNET_memcmp (coin_pub,
&dc->coin_pub))
continue;