aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-bcd.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/gns/gnunet-bcd.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/gns/gnunet-bcd.c')
-rw-r--r--src/gns/gnunet-bcd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gns/gnunet-bcd.c b/src/gns/gnunet-bcd.c
index 24014f204..e7be8fd84 100644
--- a/src/gns/gnunet-bcd.c
+++ b/src/gns/gnunet-bcd.c
@@ -287,11 +287,13 @@ prepare_daemon (struct MHD_Daemon *daemon_handle);
287 * and schedule the next run. 287 * and schedule the next run.
288 */ 288 */
289static void 289static void
290run_daemon (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 290run_daemon (void *cls)
291{ 291{
292 struct MHD_Daemon *daemon_handle = cls; 292 struct MHD_Daemon *daemon_handle = cls;
293 const struct GNUNET_SCHEDULER_TaskContext *tc;
293 294
294 http_task = NULL; 295 http_task = NULL;
296 tc = GNUNET_SCHEDULER_get_task_context ();
295 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 297 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
296 return; 298 return;
297 GNUNET_assert (MHD_YES == MHD_run (daemon_handle)); 299 GNUNET_assert (MHD_YES == MHD_run (daemon_handle));
@@ -384,8 +386,7 @@ server_start ()
384 * Stop HTTP server. 386 * Stop HTTP server.
385 */ 387 */
386static void 388static void
387server_stop (void *cls, 389server_stop (void *cls)
388 const struct GNUNET_SCHEDULER_TaskContext *tc)
389{ 390{
390 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 391 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
391 "HTTP server shutdown\n"); 392 "HTTP server shutdown\n");