aboutsummaryrefslogtreecommitdiff
path: root/src/testing/gnunet-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/testing/gnunet-testing.c
parent5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff)
downloadgnunet-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/testing/gnunet-testing.c')
-rw-r--r--src/testing/gnunet-testing.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c
index 1e640ec96..92dd17d98 100644
--- a/src/testing/gnunet-testing.c
+++ b/src/testing/gnunet-testing.c
@@ -197,10 +197,9 @@ create_hostkeys (const unsigned int no)
197 * Removes the temporary file. 197 * Removes the temporary file.
198 * 198 *
199 * @param cls unused 199 * @param cls unused
200 * @param tc scheduler context
201 */ 200 */
202static void 201static void
203cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 202cleanup (void *cls)
204{ 203{
205 if (NULL != tmpfilename) 204 if (NULL != tmpfilename)
206 { 205 {
@@ -224,14 +223,15 @@ cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
224 * Called whenever we can read stdin non-blocking 223 * Called whenever we can read stdin non-blocking
225 * 224 *
226 * @param cls unused 225 * @param cls unused
227 * @param tc scheduler context
228 */ 226 */
229static void 227static void
230stdin_cb (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 228stdin_cb (void *cls)
231{ 229{
232 int c; 230 int c;
231 const struct GNUNET_SCHEDULER_TaskContext *tc;
233 232
234 tid = NULL; 233 tid = NULL;
234 tc = GNUNET_SCHEDULER_get_task_context ();
235 if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) 235 if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason))
236 return; 236 return;
237 GNUNET_assert (0 != (GNUNET_SCHEDULER_REASON_READ_READY & tc->reason)); 237 GNUNET_assert (0 != (GNUNET_SCHEDULER_REASON_READ_READY & tc->reason));