aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-daemon-fsprofiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-daemon-fsprofiler.c')
-rw-r--r--src/fs/gnunet-daemon-fsprofiler.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/fs/gnunet-daemon-fsprofiler.c b/src/fs/gnunet-daemon-fsprofiler.c
index 326178df9..e6bc33e10 100644
--- a/src/fs/gnunet-daemon-fsprofiler.c
+++ b/src/fs/gnunet-daemon-fsprofiler.c
@@ -500,12 +500,8 @@ start_publish (void *cls)
500{ 500{
501 struct Pattern *p = cls; 501 struct Pattern *p = cls;
502 struct GNUNET_FS_FileInformation *fi; 502 struct GNUNET_FS_FileInformation *fi;
503 const struct GNUNET_SCHEDULER_TaskContext *tc;
504 503
505 p->task = NULL; 504 p->task = NULL;
506 tc = GNUNET_SCHEDULER_get_task_context ();
507 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
508 return;
509 fi = make_file (p->x, p->y, p); 505 fi = make_file (p->x, p->y, p);
510 p->start_time = GNUNET_TIME_absolute_get (); 506 p->start_time = GNUNET_TIME_absolute_get ();
511 p->ctx = GNUNET_FS_publish_start (fs_handle, 507 p->ctx = GNUNET_FS_publish_start (fs_handle,
@@ -525,12 +521,8 @@ start_download (void *cls)
525{ 521{
526 struct Pattern *p = cls; 522 struct Pattern *p = cls;
527 struct GNUNET_FS_Uri *keywords; 523 struct GNUNET_FS_Uri *keywords;
528 const struct GNUNET_SCHEDULER_TaskContext *tc;
529 524
530 p->task = NULL; 525 p->task = NULL;
531 tc = GNUNET_SCHEDULER_get_task_context ();
532 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
533 return;
534 keywords = make_keywords (p->x); 526 keywords = make_keywords (p->x);
535 p->start_time = GNUNET_TIME_absolute_get (); 527 p->start_time = GNUNET_TIME_absolute_get ();
536 p->sctx = GNUNET_FS_search_start (fs_handle, keywords, 528 p->sctx = GNUNET_FS_search_start (fs_handle, keywords,
@@ -558,8 +550,8 @@ run (void *cls, char *const *args GNUNET_UNUSED,
558 550
559 cfg = cfg_; 551 cfg = cfg_;
560 /* Scheduled the task to clean up when shutdown is called */ 552 /* Scheduled the task to clean up when shutdown is called */
561 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, 553 GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
562 NULL); 554 NULL);
563 555
564 if (GNUNET_OK != 556 if (GNUNET_OK !=
565 GNUNET_CONFIGURATION_get_value_number (cfg, 557 GNUNET_CONFIGURATION_get_value_number (cfg,