summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-10 00:57:20 +0200
committerChristian Grothoff <christian@grothoff.org>2016-04-10 00:57:20 +0200
commit0dee91e014a51a5b66cd1b0a9a7517ac75813eb6 (patch)
treed0a2dc0552b308548a069fe2c93115c33dc70b50 /src/exchange
parentdf893df505683aef0d2f484944e417ec1bcdf4aa (diff)
downloadexchange-0dee91e014a51a5b66cd1b0a9a7517ac75813eb6.tar.gz
exchange-0dee91e014a51a5b66cd1b0a9a7517ac75813eb6.tar.bz2
exchange-0dee91e014a51a5b66cd1b0a9a7517ac75813eb6.zip
changing code to meet latest change in GNUNET_SCHEDULER API
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-aggregator.c23
-rw-r--r--src/exchange/test_taler_exchange_aggregator.c32
2 files changed, 19 insertions, 36 deletions
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 80d1bbb9f..2ff3c2ca8 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -198,11 +198,9 @@ static unsigned int aggregation_limit = TALER_EXCHANGEDB_MATCHING_DEPOSITS_LIMIT
* We're being aborted with CTRL-C (or SIGTERM). Shut down.
*
* @param cls closure
- * @param tc scheduler context
*/
static void
-shutdown_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
{
if (NULL != task)
{
@@ -517,17 +515,17 @@ prepare_cb (void *cls,
* into larger wire transfers.
*
* @param cls NULL
- * @param tc scheduler context
*/
static void
-run_aggregation (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+run_aggregation (void *cls)
{
struct TALER_EXCHANGEDB_Session *session;
unsigned int i;
int ret;
+ const struct GNUNET_SCHEDULER_TaskContext *tc;
task = NULL;
+ tc = GNUNET_SCHEDULER_get_task_context ();
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -713,11 +711,9 @@ run_aggregation (void *cls,
* do.
*
* @param cls pointer to an `int` which we will return from main()
- * @param tc scheduler context
*/
static void
-run_transfers (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+run_transfers (void *cls);
/**
@@ -895,15 +891,16 @@ wire_prepare_cb (void *cls,
* @param tc scheduler context
*/
static void
-run_transfers (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+run_transfers (void *cls)
{
int ret;
struct TALER_EXCHANGEDB_Session *session;
+ const struct GNUNET_SCHEDULER_TaskContext *tc;
task = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Checking for pending wire transfers\n");
+ tc = GNUNET_SCHEDULER_get_task_context ();
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
if (NULL == (session = db_plugin->get_session (db_plugin->cls,
@@ -961,11 +958,9 @@ run_transfers (void *cls,
* First task.
*
* @param cls closure, NULL
- * @param tc scheduler context
*/
static void
-run (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+run (void *cls)
{
task = GNUNET_SCHEDULER_add_now (&run_transfers,
NULL);
diff --git a/src/exchange/test_taler_exchange_aggregator.c b/src/exchange/test_taler_exchange_aggregator.c
index f34dea837..3720ce829 100644
--- a/src/exchange/test_taler_exchange_aggregator.c
+++ b/src/exchange/test_taler_exchange_aggregator.c
@@ -305,22 +305,18 @@ static struct GNUNET_CRYPTO_RsaPublicKey *coin_pub;
* Interprets the commands from the test program.
*
* @param cls the `struct State` of the interpreter
- * @param tc scheduler context
*/
static void
-interpreter (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+interpreter (void *cls);
/**
* Task triggered whenever we are to shutdown.
*
* @param cls closure, NULL if we need to self-restart
- * @param tc context
*/
static void
-shutdown_action (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_action (void *cls)
{
shutdown_task = NULL;
if (NULL != mhd_task)
@@ -355,18 +351,18 @@ shutdown_action (void *cls,
* process died).
*
* @param cls closure, NULL if we need to self-restart
- * @param tc context
*/
static void
-maint_child_death (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+maint_child_death (void *cls)
{
const struct GNUNET_DISK_FileHandle *pr;
char c[16];
struct State *state;
+ const struct GNUNET_SCHEDULER_TaskContext *tc;
child_death_task = NULL;
pr = GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ);
+ tc = GNUNET_SCHEDULER_get_task_context ();
if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY))
{
/* shutdown scheduled us, ignore! */
@@ -384,7 +380,7 @@ maint_child_death (void *cls,
aggregator_state->ioff++;
state = aggregator_state;
aggregator_state = NULL;
- interpreter (state, NULL);
+ interpreter (state);
if (NULL == shutdown_task)
return;
child_death_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
@@ -527,11 +523,9 @@ fail (struct Command *cmd)
* Interprets the commands from the test program.
*
* @param cls the `struct State` of the interpreter
- * @param tc scheduler context
*/
static void
-interpreter (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+interpreter (void *cls)
{
struct State *state = cls;
@@ -864,11 +858,9 @@ handle_mhd_request (void *cls,
* Task run whenever HTTP server operations are pending.
*
* @param cls NULL
- * @param tc scheduler context
*/
static void
-run_mhd (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+run_mhd (void *cls);
/**
@@ -934,11 +926,9 @@ schedule_httpd ()
* Task run whenever HTTP server operations are pending.
*
* @param cls NULL
- * @param tc scheduler context
*/
static void
-run_mhd (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+run_mhd (void *cls)
{
mhd_task = NULL;
MHD_run (mhd_bank);
@@ -950,11 +940,9 @@ run_mhd (void *cls,
* Main function that will be run by the scheduler.
*
* @param cls closure with configuration
- * @param tc unused
*/
static void
-run (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+run (void *cls)
{
struct GNUNET_CONFIGURATION_Handle *cfg = cls;
struct TALER_EXCHANGEDB_DenominationKeyInformationP issue;