diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-08-11 02:47:58 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-08-11 02:47:58 +0200 |
commit | ab239f3e548028b13952c31f1063557a7d6c0322 (patch) | |
tree | d75eb734a2624a36c44af12794f3c8c3265be29f /src | |
parent | f9860f5370d286c2de25b3b93fe92ce39b4fbdf3 (diff) |
try to fix missing rollbacks for wirewatch
Diffstat (limited to 'src')
-rw-r--r-- | src/exchange/taler-exchange-wirewatch.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c index a48634eb9..9de059782 100644 --- a/src/exchange/taler-exchange-wirewatch.c +++ b/src/exchange/taler-exchange-wirewatch.c @@ -420,7 +420,7 @@ history_cb (void *cls, { struct RejectContext *rtc; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Wire transfer over %s has invalid subject `%s', sending it back!\n", TALER_amount2s (&details->amount), details->wtid_s); @@ -443,6 +443,15 @@ history_cb (void *cls, row_off_size, &reject_cb, rtc); + if (NULL == rt) + { + GNUNET_break (0); + db_plugin->rollback (db_plugin->cls, + session); + GNUNET_assert (NULL == task); + task = GNUNET_SCHEDULER_add_now (&find_transfers, + NULL); + } return GNUNET_SYSERR; /* will continue later... */ } @@ -474,7 +483,10 @@ history_cb (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got DB soft error for reserve_in_insert\n"); + db_plugin->rollback (db_plugin->cls, + session); /* try again */ + GNUNET_assert (NULL == task); task = GNUNET_SCHEDULER_add_now (&find_transfers, NULL); return GNUNET_SYSERR; @@ -540,6 +552,8 @@ find_transfers (void *cls) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to obtain starting point for montoring from database!\n"); + db_plugin->rollback (db_plugin->cls, + session); global_ret = GNUNET_SYSERR; GNUNET_SCHEDULER_shutdown (); return; @@ -547,6 +561,8 @@ find_transfers (void *cls) if (GNUNET_DB_STATUS_SOFT_ERROR == qs) { /* try again */ + db_plugin->rollback (db_plugin->cls, + session); task = GNUNET_SCHEDULER_add_now (&find_transfers, NULL); return; |