exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 96fb11bed0def1bfb3666b732dd32be253f46c01
parent 21bcc5fa0bb4e2c101fc71d5740934d5914eb480
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 22 May 2022 14:46:23 +0200

-fix

Diffstat:
Msrc/bank-lib/fakebank.c | 6++++--
Msrc/exchangedb/exchange-0001-part.sql | 2+-
Msrc/exchangedb/plugin_exchangedb_postgres.c | 4++--
3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c @@ -497,9 +497,10 @@ lp_trigger (struct LongPoller *lp, GNUNET_free (lp); h->mhd_again = true; #ifdef __linux__ - if (-1 != h->lp_event) + if (-1 == h->lp_event) #else - if (-1 != h->lp_event_in && -1 != h->lp_event_out) + if ( (-1 == h->lp_event_in) && + (-1 == h->lp_event_out) ) #endif { if (NULL != h->mhd_task) @@ -2745,6 +2746,7 @@ TALER_FAKEBANK_start2 (uint16_t port, #else { int pipefd[2]; + if (0 != pipe (pipefd)) { GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, diff --git a/src/exchangedb/exchange-0001-part.sql b/src/exchangedb/exchange-0001-part.sql @@ -925,7 +925,7 @@ CREATE INDEX IF NOT EXISTS work_shards_by_job_name_completed_last_attempt_index ON work_shards (job_name ,completed - ,last_attempt + ,last_attempt ASC ); diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c @@ -3362,8 +3362,8 @@ prepare_statements (struct PostgresClosure *pg) ",end_row" " FROM work_shards" " WHERE job_name=$1" - " AND last_attempt<$2" " AND completed=FALSE" + " AND last_attempt<$2" " ORDER BY last_attempt ASC" " LIMIT 1;", 2), @@ -12626,7 +12626,7 @@ postgres_begin_shard (void *cls, { struct PostgresClosure *pg = cls; - for (unsigned int retries = 0; retries<3; retries++) + for (unsigned int retries = 0; retries<10; retries++) { if (GNUNET_OK != postgres_start (pg,