diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
commit | 29e6158507a0758192075ac6ece7ba8e75ddc49a (patch) | |
tree | b91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/nat/gnunet-nat-server.c | |
parent | 5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff) | |
download | gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.tar.gz gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.zip |
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/nat/gnunet-nat-server.c')
-rw-r--r-- | src/nat/gnunet-nat-server.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nat/gnunet-nat-server.c b/src/nat/gnunet-nat-server.c index 31a8f294b..0069303ca 100644 --- a/src/nat/gnunet-nat-server.c +++ b/src/nat/gnunet-nat-server.c | |||
@@ -92,13 +92,14 @@ struct TcpContext | |||
92 | * (or once we failed to connect...). | 92 | * (or once we failed to connect...). |
93 | * | 93 | * |
94 | * @param cls the 'struct TcpContext' | 94 | * @param cls the 'struct TcpContext' |
95 | * @param tc scheduler context | ||
96 | */ | 95 | */ |
97 | static void | 96 | static void |
98 | tcp_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 97 | tcp_send (void *cls) |
99 | { | 98 | { |
100 | struct TcpContext *ctx = cls; | 99 | struct TcpContext *ctx = cls; |
100 | const struct GNUNET_SCHEDULER_TaskContext *tc; | ||
101 | 101 | ||
102 | tc = GNUNET_SCHEDULER_get_task_context (); | ||
102 | if ((NULL != tc->write_ready) && | 103 | if ((NULL != tc->write_ready) && |
103 | (GNUNET_NETWORK_fdset_isset (tc->write_ready, ctx->s))) | 104 | (GNUNET_NETWORK_fdset_isset (tc->write_ready, ctx->s))) |
104 | { | 105 | { |
@@ -228,10 +229,9 @@ test (void *cls, struct GNUNET_SERVER_Client *client, | |||
228 | * Task run during shutdown. | 229 | * Task run during shutdown. |
229 | * | 230 | * |
230 | * @param cls unused | 231 | * @param cls unused |
231 | * @param tc scheduler context | ||
232 | */ | 232 | */ |
233 | static void | 233 | static void |
234 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 234 | shutdown_task (void *cls) |
235 | { | 235 | { |
236 | GNUNET_SERVER_destroy (server); | 236 | GNUNET_SERVER_destroy (server); |
237 | server = NULL; | 237 | server = NULL; |