diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-12 19:07:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-12 19:07:40 +0000 |
commit | 6c471eeb15e27f8226492b4860a3c2acb94c5f25 (patch) | |
tree | a3a9dcba12ee5356c03056c10b7aba5367b2ef34 /src/datastore/perf_datastore_api.c | |
parent | 16bcbbea7133fd2265d46bd2ae1dc70e8c9ba96f (diff) | |
download | gnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.tar.gz gnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.zip |
-consistently use struct GNUNET_HashCode
Diffstat (limited to 'src/datastore/perf_datastore_api.c')
-rw-r--r-- | src/datastore/perf_datastore_api.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c index 09064ceb0..6b7a73640 100644 --- a/src/datastore/perf_datastore_api.c +++ b/src/datastore/perf_datastore_api.c | |||
@@ -171,7 +171,7 @@ remove_next (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, | |||
171 | 171 | ||
172 | 172 | ||
173 | static void | 173 | static void |
174 | delete_value (void *cls, const GNUNET_HashCode * key, size_t size, | 174 | delete_value (void *cls, const struct GNUNET_HashCode * key, size_t size, |
175 | const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, | 175 | const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, |
176 | uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, | 176 | uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, |
177 | uint64_t uid) | 177 | uint64_t uid) |
@@ -196,7 +196,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
196 | { | 196 | { |
197 | struct CpsRunContext *crc = cls; | 197 | struct CpsRunContext *crc = cls; |
198 | size_t size; | 198 | size_t size; |
199 | static GNUNET_HashCode key; | 199 | static struct GNUNET_HashCode key; |
200 | static char data[65536]; | 200 | static char data[65536]; |
201 | int i; | 201 | int i; |
202 | int k; | 202 | int k; |
@@ -206,7 +206,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
206 | switch (crc->phase) | 206 | switch (crc->phase) |
207 | { | 207 | { |
208 | case RP_PUT: | 208 | case RP_PUT: |
209 | memset (&key, 256 - crc->i, sizeof (GNUNET_HashCode)); | 209 | memset (&key, 256 - crc->i, sizeof (struct GNUNET_HashCode)); |
210 | i = crc->j; | 210 | i = crc->j; |
211 | k = crc->i; | 211 | k = crc->i; |
212 | /* most content is 32k */ | 212 | /* most content is 32k */ |
@@ -214,7 +214,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
214 | if (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16) == 0) /* but some of it is less! */ | 214 | if (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16) == 0) /* but some of it is less! */ |
215 | size = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 32 * 1024); | 215 | size = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 32 * 1024); |
216 | crc->size = size = size - (size & 7); /* always multiple of 8 */ | 216 | crc->size = size = size - (size & 7); /* always multiple of 8 */ |
217 | GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &key); | 217 | GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &key); |
218 | memset (data, i, size); | 218 | memset (data, i, size); |
219 | if (i > 255) | 219 | if (i > 255) |
220 | memset (data, i - 255, size / 2); | 220 | memset (data, i - 255, size / 2); |
@@ -298,7 +298,7 @@ run (void *cls, | |||
298 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 298 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
299 | { | 299 | { |
300 | struct CpsRunContext *crc; | 300 | struct CpsRunContext *crc; |
301 | static GNUNET_HashCode zkey; | 301 | static struct GNUNET_HashCode zkey; |
302 | 302 | ||
303 | datastore = GNUNET_DATASTORE_connect (cfg); | 303 | datastore = GNUNET_DATASTORE_connect (cfg); |
304 | start_time = GNUNET_TIME_absolute_get (); | 304 | start_time = GNUNET_TIME_absolute_get (); |