diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-05-06 19:59:59 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-05-06 19:59:59 +0000 |
commit | 7db4f64461a77f19bb39f1b84d26f96e6acf40ab (patch) | |
tree | 7d2adef1cebe18d80806bba3d534e9a1e4a44ac6 /src/util/test_crypto_hash.c | |
parent | 0ece77aca2114b6e5ec153477fccb43ceb807c77 (diff) | |
download | gnunet-7db4f64461a77f19bb39f1b84d26f96e6acf40ab.tar.gz gnunet-7db4f64461a77f19bb39f1b84d26f96e6acf40ab.zip |
allow file hashing cancellation -- and make use of it
Diffstat (limited to 'src/util/test_crypto_hash.c')
-rw-r--r-- | src/util/test_crypto_hash.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/test_crypto_hash.c b/src/util/test_crypto_hash.c index b650355c0..f793e3342 100644 --- a/src/util/test_crypto_hash.c +++ b/src/util/test_crypto_hash.c | |||
@@ -122,9 +122,11 @@ finished_task (void *cls, const GNUNET_HashCode * res) | |||
122 | static void | 122 | static void |
123 | file_hasher (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 123 | file_hasher (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
124 | { | 124 | { |
125 | GNUNET_CRYPTO_hash_file (tc->sched, | 125 | GNUNET_assert (NULL != |
126 | GNUNET_SCHEDULER_PRIORITY_DEFAULT, | 126 | GNUNET_CRYPTO_hash_file (tc->sched, |
127 | FILENAME, 1024, &finished_task, cls); | 127 | GNUNET_SCHEDULER_PRIORITY_DEFAULT, |
128 | FILENAME, 1024, | ||
129 | &finished_task, cls)); | ||
128 | } | 130 | } |
129 | 131 | ||
130 | 132 | ||