diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-01 21:12:17 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-01 21:12:17 +0000 |
commit | 64c442461b84953230d3dc4e78cb649db6c54abc (patch) | |
tree | 49ec875b32ce171aac2bbae1b5fcaad516a94cf6 /src/util/crypto_hash.c | |
parent | 0413c7690e087a0514447a87bc8118b2a244c902 (diff) | |
download | gnunet-64c442461b84953230d3dc4e78cb649db6c54abc.tar.gz gnunet-64c442461b84953230d3dc4e78cb649db6c54abc.zip |
changing scheduler priorities to revert to DEFAULT instead of inheriting parent-task priority unless something else is explicitly specified
Diffstat (limited to 'src/util/crypto_hash.c')
-rw-r--r-- | src/util/crypto_hash.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 2ab682494..9faa213ae 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -106,6 +106,11 @@ struct GNUNET_CRYPTO_FileHashContext | |||
106 | GNUNET_SCHEDULER_TaskIdentifier task; | 106 | GNUNET_SCHEDULER_TaskIdentifier task; |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * Priority we use. | ||
110 | */ | ||
111 | enum GNUNET_SCHEDULER_Priority priority; | ||
112 | |||
113 | /** | ||
109 | * Blocksize. | 114 | * Blocksize. |
110 | */ | 115 | */ |
111 | size_t bsize; | 116 | size_t bsize; |
@@ -162,7 +167,8 @@ file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
162 | file_hash_finish (fhc, res); | 167 | file_hash_finish (fhc, res); |
163 | return; | 168 | return; |
164 | } | 169 | } |
165 | fhc->task = GNUNET_SCHEDULER_add_now (&file_hash_task, fhc); | 170 | fhc->task = GNUNET_SCHEDULER_add_with_priority (fhc->priority, |
171 | &file_hash_task, fhc); | ||
166 | } | 172 | } |
167 | 173 | ||
168 | 174 | ||
@@ -213,6 +219,7 @@ GNUNET_CRYPTO_hash_file (enum GNUNET_SCHEDULER_Priority priority, | |||
213 | GNUNET_free (fhc); | 219 | GNUNET_free (fhc); |
214 | return NULL; | 220 | return NULL; |
215 | } | 221 | } |
222 | fhc->priority = priority; | ||
216 | fhc->task = | 223 | fhc->task = |
217 | GNUNET_SCHEDULER_add_with_priority (priority, &file_hash_task, fhc); | 224 | GNUNET_SCHEDULER_add_with_priority (priority, &file_hash_task, fhc); |
218 | return fhc; | 225 | return fhc; |