aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bank-lib/fakebank.c6
-rw-r--r--src/exchangedb/exchange-0001-part.sql2
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c4
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,