merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit df02047855a345742cc57988ae971eb47bc1a93f
parent a519c6229c83ac8bcf405f1b96043f9e1eb396f9
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 28 Jan 2024 20:15:38 +0100

-fix timeout if there were results

Diffstat:
Msrc/backend/taler-merchant-wirewatch.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/backend/taler-merchant-wirewatch.c b/src/backend/taler-merchant-wirewatch.c @@ -367,8 +367,10 @@ credit_cb ( &details->amount, details->credit_account_uri, true /* confirmed */); - if (0 == qs) + if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) { + /* FIXME: this *also* logs if the entry simply + already exists. Modify code to distinguish! */ GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Inserting transfer for %s into database failed. Is the credit account %s configured correctly?\n", w->instance_id, @@ -400,7 +402,8 @@ credit_cb ( case MHD_HTTP_NO_CONTENT: save (w); /* Delay artificially if server returned before long-poll timeout */ - w->delay = GNUNET_TIME_absolute_get_remaining (w->long_poll_timeout); + if (! w->found) + w->delay = GNUNET_TIME_absolute_get_remaining (w->long_poll_timeout); break; case MHD_HTTP_NOT_FOUND: /* configuration likely wrong, wait at least 1 minute, backoff up to 15 minutes! */