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.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/fs/gnunet-daemon-fsprofiler.c b/src/fs/gnunet-daemon-fsprofiler.c
index 77a293a23..326178df9 100644
--- a/src/fs/gnunet-daemon-fsprofiler.c
+++ b/src/fs/gnunet-daemon-fsprofiler.c
@@ -267,10 +267,9 @@ make_file (uint64_t length,
267 * Task run during shutdown. 267 * Task run during shutdown.
268 * 268 *
269 * @param cls unused 269 * @param cls unused
270 * @param tc unused
271 */ 270 */
272static void 271static void
273shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 272shutdown_task (void *cls)
274{ 273{
275 struct Pattern *p; 274 struct Pattern *p;
276 275
@@ -313,10 +312,9 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
313 * Task run when a publish operation should be stopped. 312 * Task run when a publish operation should be stopped.
314 * 313 *
315 * @param cls the 'struct Pattern' of the publish operation to stop 314 * @param cls the 'struct Pattern' of the publish operation to stop
316 * @param tc unused
317 */ 315 */
318static void 316static void
319publish_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 317publish_stop_task (void *cls)
320{ 318{
321 struct Pattern *p = cls; 319 struct Pattern *p = cls;
322 320
@@ -329,10 +327,9 @@ publish_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
329 * Task run when a download operation should be stopped. 327 * Task run when a download operation should be stopped.
330 * 328 *
331 * @param cls the 'struct Pattern' of the download operation to stop 329 * @param cls the 'struct Pattern' of the download operation to stop
332 * @param tc unused
333 */ 330 */
334static void 331static void
335download_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 332download_stop_task (void *cls)
336{ 333{
337 struct Pattern *p = cls; 334 struct Pattern *p = cls;
338 335
@@ -345,10 +342,9 @@ download_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
345 * Task run when a download operation should be stopped. 342 * Task run when a download operation should be stopped.
346 * 343 *
347 * @param cls the 'struct Pattern' of the download operation to stop 344 * @param cls the 'struct Pattern' of the download operation to stop
348 * @param tc unused
349 */ 345 */
350static void 346static void
351search_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 347search_stop_task (void *cls)
352{ 348{
353 struct Pattern *p = cls; 349 struct Pattern *p = cls;
354 350
@@ -498,16 +494,16 @@ progress_cb (void *cls,
498 * Start publish operation. 494 * Start publish operation.
499 * 495 *
500 * @param cls the 'struct Pattern' specifying the operation to perform 496 * @param cls the 'struct Pattern' specifying the operation to perform
501 * @param tc scheduler context
502 */ 497 */
503static void 498static void
504start_publish (void *cls, 499start_publish (void *cls)
505 const struct GNUNET_SCHEDULER_TaskContext *tc)
506{ 500{
507 struct Pattern *p = cls; 501 struct Pattern *p = cls;
508 struct GNUNET_FS_FileInformation *fi; 502 struct GNUNET_FS_FileInformation *fi;
503 const struct GNUNET_SCHEDULER_TaskContext *tc;
509 504
510 p->task = NULL; 505 p->task = NULL;
506 tc = GNUNET_SCHEDULER_get_task_context ();
511 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 507 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
512 return; 508 return;
513 fi = make_file (p->x, p->y, p); 509 fi = make_file (p->x, p->y, p);
@@ -523,16 +519,16 @@ start_publish (void *cls,
523 * Start download operation. 519 * Start download operation.
524 * 520 *
525 * @param cls the 'struct Pattern' specifying the operation to perform 521 * @param cls the 'struct Pattern' specifying the operation to perform
526 * @param tc scheduler context
527 */ 522 */
528static void 523static void
529start_download (void *cls, 524start_download (void *cls)
530 const struct GNUNET_SCHEDULER_TaskContext *tc)
531{ 525{
532 struct Pattern *p = cls; 526 struct Pattern *p = cls;
533 struct GNUNET_FS_Uri *keywords; 527 struct GNUNET_FS_Uri *keywords;
528 const struct GNUNET_SCHEDULER_TaskContext *tc;
534 529
535 p->task = NULL; 530 p->task = NULL;
531 tc = GNUNET_SCHEDULER_get_task_context ();
536 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 532 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
537 return; 533 return;
538 keywords = make_keywords (p->x); 534 keywords = make_keywords (p->x);