summaryrefslogtreecommitdiff
path: root/src/bank-lib/test_bank_api.c
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/bank-lib/test_bank_api.c
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/bank-lib/test_bank_api.c')
-rw-r--r--src/bank-lib/test_bank_api.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c
index 66f3557b9..cc1086e73 100644
--- a/src/bank-lib/test_bank_api.c
+++ b/src/bank-lib/test_bank_api.c
@@ -163,11 +163,9 @@ struct InterpreterState
* Task that runs the context's event loop with the GNUnet scheduler.
*
* @param cls unused
- * @param tc scheduler context (unused)
*/
static void
-context_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+context_task (void *cls);
/**
@@ -233,11 +231,9 @@ find_command (const struct InterpreterState *is,
* Run the main interpreter loop that performs bank operations.
*
* @param cls contains the `struct InterpreterState`
- * @param tc scheduler context
*/
static void
-interpreter_run (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+interpreter_run (void *cls);
/**
@@ -281,17 +277,17 @@ add_incoming_cb (void *cls,
* Run the main interpreter loop that performs bank operations.
*
* @param cls contains the `struct InterpreterState`
- * @param tc scheduler context
*/
static void
-interpreter_run (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+interpreter_run (void *cls)
{
struct InterpreterState *is = cls;
struct Command *cmd = &is->commands[is->ip];
struct TALER_Amount amount;
+ const struct GNUNET_SCHEDULER_TaskContext *tc;
is->task = NULL;
+ tc = GNUNET_SCHEDULER_get_task_context ();
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
{
fprintf (stderr,
@@ -354,11 +350,9 @@ interpreter_run (void *cls,
* Cleans up our state.
*
* @param cls the interpreter state.
- * @param tc unused
*/
static void
-do_shutdown (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_shutdown (void *cls)
{
struct InterpreterState *is = cls;
struct Command *cmd;
@@ -415,11 +409,9 @@ do_shutdown (void *cls,
* Task that runs the context's event loop with the GNUnet scheduler.
*
* @param cls unused
- * @param tc scheduler context (unused)
*/
static void
-context_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+context_task (void *cls)
{
long timeout;
int max_fd;
@@ -471,13 +463,9 @@ context_task (void *cls,
* Main function that will be run by the scheduler.
*
* @param cls closure
- * @param args remaining command-line arguments
- * @param cfgfile name of the configuration file used (for saving, can be NULL!)
- * @param config configuration
*/
static void
-run (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+run (void *cls)
{
struct InterpreterState *is;
static struct Command commands[] =