summaryrefslogtreecommitdiff
path: root/src/transport/transport-testing.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
commit29e6158507a0758192075ac6ece7ba8e75ddc49a (patch)
treeb91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/transport/transport-testing.c
parent5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff)
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/transport/transport-testing.c')
-rw-r--r--src/transport/transport-testing.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 7538e2d6a..652a4e08f 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -195,11 +195,9 @@ get_hello (void *cb_cls,
* Offer the current HELLO of P2 to P1.
*
* @param cls our `struct GNUNET_TRANSPORT_TESTING_ConnectRequest `
- * @param tc scheduler context
*/
static void
-offer_hello (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+offer_hello (void *cls);
/**
@@ -207,8 +205,7 @@ offer_hello (void *cls,
* transport service.
*/
static void
-hello_offered (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+hello_offered (void *cls)
{
struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc = cls;
@@ -224,17 +221,17 @@ hello_offered (void *cls,
* Offer the current HELLO of P2 to P1.
*
* @param cls our `struct GNUNET_TRANSPORT_TESTING_ConnectRequest `
- * @param tc scheduler context
*/
static void
-offer_hello (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+offer_hello (void *cls)
{
struct GNUNET_TRANSPORT_TESTING_ConnectRequest *cc = cls;
struct PeerContext *p1 = cc->p1;
struct PeerContext *p2 = cc->p2;
+ const struct GNUNET_SCHEDULER_TaskContext *tc;
cc->tct = NULL;
+ tc = GNUNET_SCHEDULER_get_task_context ();
if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
return;
{