aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs.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/fs/gnunet-service-fs.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/fs/gnunet-service-fs.c')
-rw-r--r--src/fs/gnunet-service-fs.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index aebbe5854..2ba96334c 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -184,11 +184,9 @@ static struct GNUNET_PeerIdentity my_id;
184 * Task that periodically ages our cover traffic statistics. 184 * Task that periodically ages our cover traffic statistics.
185 * 185 *
186 * @param cls unused closure 186 * @param cls unused closure
187 * @param tc task context
188 */ 187 */
189static void 188static void
190age_cover_counters (void *cls, 189age_cover_counters (void *cls)
191 const struct GNUNET_SCHEDULER_TaskContext *tc)
192{ 190{
193 GSF_cover_content_count = (GSF_cover_content_count * 15) / 16; 191 GSF_cover_content_count = (GSF_cover_content_count * 15) / 16;
194 GSF_cover_query_count = (GSF_cover_query_count * 15) / 16; 192 GSF_cover_query_count = (GSF_cover_query_count * 15) / 16;
@@ -531,11 +529,9 @@ handle_loc_sign (void *cls,
531 * Task run during shutdown. 529 * Task run during shutdown.
532 * 530 *
533 * @param cls unused 531 * @param cls unused
534 * @param tc unused
535 */ 532 */
536static void 533static void
537shutdown_task (void *cls, 534shutdown_task (void *cls)
538 const struct GNUNET_SCHEDULER_TaskContext *tc)
539{ 535{
540 GSF_cadet_stop_client (); 536 GSF_cadet_stop_client ();
541 GSF_cadet_stop_server (); 537 GSF_cadet_stop_server ();
@@ -821,7 +817,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
821 (GNUNET_OK != main_init (server, cfg))) 817 (GNUNET_OK != main_init (server, cfg)))
822 { 818 {
823 GNUNET_SCHEDULER_shutdown (); 819 GNUNET_SCHEDULER_shutdown ();
824 shutdown_task (NULL, NULL); 820 shutdown_task (NULL);
825 return; 821 return;
826 } 822 }
827} 823}