aboutsummaryrefslogtreecommitdiff
path: root/src/dht/test_dht_twopeer_put_get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/test_dht_twopeer_put_get.c')
-rw-r--r--src/dht/test_dht_twopeer_put_get.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/dht/test_dht_twopeer_put_get.c b/src/dht/test_dht_twopeer_put_get.c
index 44009c257..275a01a32 100644
--- a/src/dht/test_dht_twopeer_put_get.c
+++ b/src/dht/test_dht_twopeer_put_get.c
@@ -207,11 +207,10 @@ static void
207get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, 207get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
208 const GNUNET_HashCode * key, 208 const GNUNET_HashCode * key,
209 const struct GNUNET_PeerIdentity *get_path, 209 const struct GNUNET_PeerIdentity *get_path,
210 unsigned int get_path_size, 210 unsigned int get_path_size,
211 const struct GNUNET_PeerIdentity *put_path, 211 const struct GNUNET_PeerIdentity *put_path,
212 unsigned int put_path_size, 212 unsigned int put_path_size, enum GNUNET_BLOCK_Type type,
213 enum GNUNET_BLOCK_Type type, size_t size, 213 size_t size, const void *result_data)
214 const void *result_data)
215{ 214{
216 GNUNET_HashCode original_key; /* Key data was stored data under */ 215 GNUNET_HashCode original_key; /* Key data was stored data under */
217 char original_data[4]; /* Made up data that was stored */ 216 char original_data[4]; /* Made up data that was stored */
@@ -254,10 +253,9 @@ put_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
254 253
255 memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ 254 memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
256 global_get_handle = 255 global_get_handle =
257 GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_UNIT_FOREVER_REL, 256 GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_UNIT_FOREVER_REL,
258 GNUNET_BLOCK_TYPE_TEST, 257 GNUNET_BLOCK_TYPE_TEST, &key, 1, GNUNET_DHT_RO_NONE,
259 &key, 1, GNUNET_DHT_RO_NONE, 258 NULL, 0, &get_result_iterator, NULL);
260 NULL, 0, &get_result_iterator, NULL);
261} 259}
262 260
263 261
@@ -274,10 +272,9 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
274 memset (data, 43, sizeof (data)); 272 memset (data, 43, sizeof (data));
275 273
276 /* Insert the data at the first peer */ 274 /* Insert the data at the first peer */
277 GNUNET_DHT_put (peer1dht, &key, 1, GNUNET_DHT_RO_NONE, 275 GNUNET_DHT_put (peer1dht, &key, 1, GNUNET_DHT_RO_NONE, GNUNET_BLOCK_TYPE_TEST,
278 GNUNET_BLOCK_TYPE_TEST, sizeof (data), data, 276 sizeof (data), data, GNUNET_TIME_UNIT_FOREVER_ABS,
279 GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_TIME_UNIT_FOREVER_REL, 277 GNUNET_TIME_UNIT_FOREVER_REL, &put_finished, NULL);
280 &put_finished, NULL);
281} 278}
282 279
283 280