diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-05-22 14:46:23 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-05-22 14:46:23 +0200 |
commit | 96fb11bed0def1bfb3666b732dd32be253f46c01 (patch) | |
tree | ff082f258d4aff4ceb4450672296d9f11b938a4f /src | |
parent | 21bcc5fa0bb4e2c101fc71d5740934d5914eb480 (diff) | |
download | exchange-96fb11bed0def1bfb3666b732dd32be253f46c01.tar.xz |
-fix
Diffstat (limited to 'src')
-rw-r--r-- | src/bank-lib/fakebank.c | 6 | ||||
-rw-r--r-- | src/exchangedb/exchange-0001-part.sql | 2 | ||||
-rw-r--r-- | src/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 index db30851d8..66e44e1db 100644 --- 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 index 1b1d2a38e..d8855b011 100644 --- 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 index 2c113cf19..7a908398d 100644 --- 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, |