summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-09-30 13:47:46 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-09-30 13:47:46 +0200
commitf00a49e40c035e5345ef90b8fae134467454c97b (patch)
treee25111c278a1de3fa347b396f91996769a31d1ba /src
parente72a7188ace86febbc00b12eb66dd2544f31d69d (diff)
downloadexchange-f00a49e40c035e5345ef90b8fae134467454c97b.tar.gz
exchange-f00a49e40c035e5345ef90b8fae134467454c97b.tar.bz2
exchange-f00a49e40c035e5345ef90b8fae134467454c97b.zip
fixing aggregator hanging after bank's error
Diffstat (limited to 'src')
-rw-r--r--src/exchange/taler-exchange-aggregator.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 6b261662..9a3c2a1d 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -599,6 +599,7 @@ run_aggregation (void *cls)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to obtain database session!\n");
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
return;
}
if (GNUNET_OK !=
@@ -608,6 +609,7 @@ run_aggregation (void *cls)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to start database transaction!\n");
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
return;
}
au = GNUNET_new (struct AggregationUnit);
@@ -629,6 +631,7 @@ run_aggregation (void *cls)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to execute deposit iteration!\n");
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -683,6 +686,7 @@ run_aggregation (void *cls)
db_plugin->rollback (db_plugin->cls,
session);
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
return;
}
@@ -709,6 +713,7 @@ run_aggregation (void *cls)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to start database transaction!\n");
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
GNUNET_free_non_null (au->additional_rows);
if (NULL != au->wire)
json_decref (au->wire);
@@ -892,6 +897,7 @@ wire_confirm_cb (void *cls,
db_plugin->rollback (db_plugin->cls,
session);
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
GNUNET_free (wpd);
wpd = NULL;
return;
@@ -905,6 +911,7 @@ wire_confirm_cb (void *cls,
db_plugin->rollback (db_plugin->cls,
session);
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
GNUNET_free (wpd);
wpd = NULL;
return;
@@ -964,6 +971,7 @@ wire_prepare_cb (void *cls,
db_plugin->rollback (db_plugin->cls,
wpd->session);
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
GNUNET_free (wpd);
wpd = NULL;
return;
@@ -1006,6 +1014,7 @@ run_transfers (void *cls)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to start database transaction!\n");
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
return;
}
wpd = GNUNET_new (struct WirePrepareData);
@@ -1020,6 +1029,7 @@ run_transfers (void *cls)
db_plugin->rollback (db_plugin->cls,
session);
global_ret = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
GNUNET_free (wpd);
wpd = NULL;
return;