[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: add a bit more diag
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: add a bit more diagnostics for Florian's assertion on line 370, plus likely a related fix as some error cases did not properly return and instead continued execution |
Date: |
Sat, 09 Dec 2017 19:49:49 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new cea6fc5 add a bit more diagnostics for Florian's assertion on line
370, plus likely a related fix as some error cases did not properly return and
instead continued execution
cea6fc5 is described below
commit cea6fc540c1038877b6ea8b14a4014d192aae515
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Dec 9 19:49:13 2017 +0100
add a bit more diagnostics for Florian's assertion on line 370, plus likely
a related fix as some error cases did not properly return and instead continued
execution
---
src/backend/taler-merchant-httpd_pay.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/backend/taler-merchant-httpd_pay.c
b/src/backend/taler-merchant-httpd_pay.c
index 34d676a..0d0f9e2 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -469,6 +469,7 @@ deposit_cb (void *cls,
enum GNUNET_DB_QueryStatus qs;
dc->dh = NULL;
+ GNUNET_assert (GNUNET_YES == pc->suspended);
pc->pending--;
if (MHD_HTTP_OK != http_status)
{
@@ -551,17 +552,25 @@ deposit_cb (void *cls,
&pc->h_contract_terms,
&pc->mi->pubkey);
if (0 > qs)
+ {
+ abort_deposit (pc);
+ db->rollback (db->cls);
resume_pay_with_response (pc,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TMH_RESPONSE_make_internal_error
(TALER_EC_PAY_DB_STORE_PAYMENTS_ERROR,
"Merchant
database error: could not mark proposal as 'paid'"));
+ return;
+ }
qs = db->commit (db->cls);
if (0 > qs)
+ {
+ abort_deposit (pc);
resume_pay_with_response (pc,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TMH_RESPONSE_make_internal_error
(TALER_EC_PAY_DB_STORE_PAYMENTS_ERROR,
"Merchant
database error: could not commit"));
-
+ return;
+ }
resume_pay_with_response (pc,
MHD_HTTP_OK,
sign_success_response (pc));
@@ -701,6 +710,7 @@ process_pay_with_exchange (void *cls,
enum GNUNET_DB_QueryStatus qs;
pc->fo = NULL;
+ GNUNET_assert (GNUNET_YES == pc->suspended);
if (NULL == mh)
{
/* The exchange on offer is not in the set of our (trusted)
@@ -1115,6 +1125,7 @@ handle_pay_timeout (void *cls)
struct PayContext *pc = cls;
pc->timeout_task = NULL;
+ GNUNET_assert (GNUNET_YES == pc->suspended);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Resuming /pay with error after timeout\n");
if (NULL != pc->fo)
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: add a bit more diagnostics for Florian's assertion on line 370, plus likely a related fix as some error cases did not properly return and instead continued execution,
gnunet <=