diff options
Diffstat (limited to 'src/dht/test_dht_twopeer_put_get.c')
-rw-r--r-- | src/dht/test_dht_twopeer_put_get.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dht/test_dht_twopeer_put_get.c b/src/dht/test_dht_twopeer_put_get.c index 9419194b9..d577a856a 100644 --- a/src/dht/test_dht_twopeer_put_get.c +++ b/src/dht/test_dht_twopeer_put_get.c | |||
@@ -217,21 +217,21 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
217 | */ | 217 | */ |
218 | static void | 218 | static void |
219 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | 219 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, |
220 | const GNUNET_HashCode * key, | 220 | const struct GNUNET_HashCode * key, |
221 | const struct GNUNET_PeerIdentity *get_path, | 221 | const struct GNUNET_PeerIdentity *get_path, |
222 | unsigned int get_path_size, | 222 | unsigned int get_path_size, |
223 | const struct GNUNET_PeerIdentity *put_path, | 223 | const struct GNUNET_PeerIdentity *put_path, |
224 | unsigned int put_path_size, enum GNUNET_BLOCK_Type type, | 224 | unsigned int put_path_size, enum GNUNET_BLOCK_Type type, |
225 | size_t size, const void *result_data) | 225 | size_t size, const void *result_data) |
226 | { | 226 | { |
227 | GNUNET_HashCode original_key; /* Key data was stored data under */ | 227 | struct GNUNET_HashCode original_key; /* Key data was stored data under */ |
228 | char original_data[4]; /* Made up data that was stored */ | 228 | char original_data[4]; /* Made up data that was stored */ |
229 | 229 | ||
230 | memset (&original_key, 42, sizeof (GNUNET_HashCode)); /* Set the key to what it was set to previously */ | 230 | memset (&original_key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to what it was set to previously */ |
231 | memset (original_data, 43, sizeof (original_data)); | 231 | memset (original_data, 43, sizeof (original_data)); |
232 | 232 | ||
233 | if ((sizeof (original_data) != size) || | 233 | if ((sizeof (original_data) != size) || |
234 | (0 != memcmp (&original_key, key, sizeof (GNUNET_HashCode))) || | 234 | (0 != memcmp (&original_key, key, sizeof (struct GNUNET_HashCode))) || |
235 | (0 != memcmp (original_data, result_data, sizeof (original_data)))) | 235 | (0 != memcmp (original_data, result_data, sizeof (original_data)))) |
236 | { | 236 | { |
237 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 237 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
@@ -256,7 +256,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
256 | static void | 256 | static void |
257 | put_finished (void *cls, int success) | 257 | put_finished (void *cls, int success) |
258 | { | 258 | { |
259 | GNUNET_HashCode key; /* Key for data lookup */ | 259 | struct GNUNET_HashCode key; /* Key for data lookup */ |
260 | 260 | ||
261 | put_op = NULL; | 261 | put_op = NULL; |
262 | GNUNET_SCHEDULER_cancel (die_task); | 262 | GNUNET_SCHEDULER_cancel (die_task); |
@@ -264,7 +264,7 @@ put_finished (void *cls, int success) | |||
264 | GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &end_badly, | 264 | GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &end_badly, |
265 | "waiting for get response (data not found)"); | 265 | "waiting for get response (data not found)"); |
266 | 266 | ||
267 | memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ | 267 | memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ |
268 | global_get_handle = | 268 | global_get_handle = |
269 | GNUNET_DHT_get_start (peer2dht, | 269 | GNUNET_DHT_get_start (peer2dht, |
270 | GNUNET_BLOCK_TYPE_TEST, &key, 1, GNUNET_DHT_RO_NONE, | 270 | GNUNET_BLOCK_TYPE_TEST, &key, 1, GNUNET_DHT_RO_NONE, |
@@ -278,10 +278,10 @@ put_finished (void *cls, int success) | |||
278 | static void | 278 | static void |
279 | do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 279 | do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
280 | { | 280 | { |
281 | GNUNET_HashCode key; /* Made up key to store data under */ | 281 | struct GNUNET_HashCode key; /* Made up key to store data under */ |
282 | char data[4]; /* Made up data to store */ | 282 | char data[4]; /* Made up data to store */ |
283 | 283 | ||
284 | memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */ | 284 | memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */ |
285 | memset (data, 43, sizeof (data)); | 285 | memset (data, 43, sizeof (data)); |
286 | 286 | ||
287 | /* Insert the data at the first peer */ | 287 | /* Insert the data at the first peer */ |