diff options
Diffstat (limited to 'src/util/crypto_hash.c')
-rw-r--r-- | src/util/crypto_hash.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 3f5869489..dcee545f7 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -416,11 +416,6 @@ struct FileHashContext | |||
416 | uint64_t offset; | 416 | uint64_t offset; |
417 | 417 | ||
418 | /** | 418 | /** |
419 | * Run on shutdown? | ||
420 | */ | ||
421 | int run_on_shutdown; | ||
422 | |||
423 | /** | ||
424 | * File descriptor. | 419 | * File descriptor. |
425 | */ | 420 | */ |
426 | struct GNUNET_DISK_FileHandle *fh; | 421 | struct GNUNET_DISK_FileHandle *fh; |
@@ -476,8 +471,6 @@ file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
476 | return; | 471 | return; |
477 | } | 472 | } |
478 | GNUNET_SCHEDULER_add_after (tc->sched, | 473 | GNUNET_SCHEDULER_add_after (tc->sched, |
479 | fhc->run_on_shutdown, | ||
480 | GNUNET_SCHEDULER_PRIORITY_KEEP, | ||
481 | GNUNET_SCHEDULER_NO_TASK, &file_hash_task, fhc); | 474 | GNUNET_SCHEDULER_NO_TASK, &file_hash_task, fhc); |
482 | } | 475 | } |
483 | 476 | ||
@@ -487,7 +480,6 @@ file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
487 | * | 480 | * |
488 | * @param sched scheduler to use | 481 | * @param sched scheduler to use |
489 | * @param priority scheduling priority to use | 482 | * @param priority scheduling priority to use |
490 | * @param run_on_shutdown should we complete even on shutdown? | ||
491 | * @param filename name of file to hash | 483 | * @param filename name of file to hash |
492 | * @param blocksize number of bytes to process in one task | 484 | * @param blocksize number of bytes to process in one task |
493 | * @param callback function to call upon completion | 485 | * @param callback function to call upon completion |
@@ -496,7 +488,6 @@ file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
496 | void | 488 | void |
497 | GNUNET_CRYPTO_hash_file (struct GNUNET_SCHEDULER_Handle *sched, | 489 | GNUNET_CRYPTO_hash_file (struct GNUNET_SCHEDULER_Handle *sched, |
498 | enum GNUNET_SCHEDULER_Priority priority, | 490 | enum GNUNET_SCHEDULER_Priority priority, |
499 | int run_on_shutdown, | ||
500 | const char *filename, | 491 | const char *filename, |
501 | size_t blocksize, | 492 | size_t blocksize, |
502 | GNUNET_CRYPTO_HashCompletedCallback callback, | 493 | GNUNET_CRYPTO_HashCompletedCallback callback, |
@@ -518,7 +509,6 @@ GNUNET_CRYPTO_hash_file (struct GNUNET_SCHEDULER_Handle *sched, | |||
518 | file_hash_finish (fhc, NULL); | 509 | file_hash_finish (fhc, NULL); |
519 | return; | 510 | return; |
520 | } | 511 | } |
521 | fhc->run_on_shutdown = run_on_shutdown; | ||
522 | fhc->fh = GNUNET_DISK_file_open (filename, | 512 | fhc->fh = GNUNET_DISK_file_open (filename, |
523 | GNUNET_DISK_OPEN_READ, | 513 | GNUNET_DISK_OPEN_READ, |
524 | GNUNET_DISK_PERM_NONE); | 514 | GNUNET_DISK_PERM_NONE); |
@@ -527,10 +517,7 @@ GNUNET_CRYPTO_hash_file (struct GNUNET_SCHEDULER_Handle *sched, | |||
527 | file_hash_finish (fhc, NULL); | 517 | file_hash_finish (fhc, NULL); |
528 | return; | 518 | return; |
529 | } | 519 | } |
530 | GNUNET_SCHEDULER_add_after (sched, | 520 | GNUNET_SCHEDULER_add_with_priority (sched, priority, &file_hash_task, fhc); |
531 | run_on_shutdown, | ||
532 | priority, | ||
533 | GNUNET_SCHEDULER_NO_TASK, &file_hash_task, fhc); | ||
534 | } | 521 | } |
535 | 522 | ||
536 | 523 | ||