diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-27 21:11:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-27 21:11:28 +0000 |
commit | a1d613b1e775afb6020db47af7ffa3b3915d6c91 (patch) | |
tree | f39eac5b39f3113e514051213653a22cedbb0307 /src/dht/test_dht_twopeer_path_tracking.c | |
parent | a9c2c9e208c23b3923744e854aa7aa32355b1bb1 (diff) | |
download | gnunet-a1d613b1e775afb6020db47af7ffa3b3915d6c91.tar.gz gnunet-a1d613b1e775afb6020db47af7ffa3b3915d6c91.zip |
make compile
Diffstat (limited to 'src/dht/test_dht_twopeer_path_tracking.c')
-rw-r--r-- | src/dht/test_dht_twopeer_path_tracking.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/dht/test_dht_twopeer_path_tracking.c b/src/dht/test_dht_twopeer_path_tracking.c index 9985939ae..e88b7c8e9 100644 --- a/src/dht/test_dht_twopeer_path_tracking.c +++ b/src/dht/test_dht_twopeer_path_tracking.c | |||
@@ -190,8 +190,10 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
190 | void | 190 | void |
191 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | 191 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, |
192 | const GNUNET_HashCode * key, | 192 | const GNUNET_HashCode * key, |
193 | const struct GNUNET_PeerIdentity *const *get_path, | 193 | const struct GNUNET_PeerIdentity *get_path, |
194 | const struct GNUNET_PeerIdentity *const *put_path, | 194 | unsigned int get_path_length, |
195 | const struct GNUNET_PeerIdentity *put_path, | ||
196 | unsigned int put_path_length, | ||
195 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) | 197 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) |
196 | { | 198 | { |
197 | GNUNET_HashCode original_key; /* Key data was stored data under */ | 199 | GNUNET_HashCode original_key; /* Key data was stored data under */ |
@@ -218,15 +220,15 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, | |||
218 | if (put_path != NULL) | 220 | if (put_path != NULL) |
219 | { | 221 | { |
220 | fprintf (stderr, "PUT Path: "); | 222 | fprintf (stderr, "PUT Path: "); |
221 | for (i = 0; put_path[i] != NULL; i++) | 223 | for (i = 0; i<put_path_length; i++) |
222 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (put_path[i])); | 224 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&put_path[i])); |
223 | fprintf (stderr, "\n"); | 225 | fprintf (stderr, "\n"); |
224 | } | 226 | } |
225 | if (get_path != NULL) | 227 | if (get_path != NULL) |
226 | { | 228 | { |
227 | fprintf (stderr, "GET Path: "); | 229 | fprintf (stderr, "GET Path: "); |
228 | for (i = 0; get_path[i] != NULL; i++) | 230 | for (i = 0; i<get_path_length; i++) |
229 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (get_path[i])); | 231 | fprintf (stderr, "%s%s", i == 0 ? "" : "->", GNUNET_i2s (&get_path[i])); |
230 | fprintf (stderr, "\n"); | 232 | fprintf (stderr, "\n"); |
231 | } | 233 | } |
232 | #endif | 234 | #endif |
@@ -249,8 +251,8 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
249 | global_get_handle = | 251 | global_get_handle = |
250 | GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_relative_get_forever (), | 252 | GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_relative_get_forever (), |
251 | GNUNET_BLOCK_TYPE_TEST, &key, | 253 | GNUNET_BLOCK_TYPE_TEST, &key, |
252 | DEFAULT_GET_REPLICATION, GNUNET_DHT_RO_RECORD_ROUTE, | 254 | 1, GNUNET_DHT_RO_RECORD_ROUTE, |
253 | NULL, 0, NULL, 0, &get_result_iterator, NULL); | 255 | NULL, 0, &get_result_iterator, NULL); |
254 | } | 256 | } |
255 | 257 | ||
256 | /** | 258 | /** |
@@ -281,7 +283,7 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
281 | memset (data, 43, sizeof (data)); | 283 | memset (data, 43, sizeof (data)); |
282 | 284 | ||
283 | /* Insert the data at the first peer */ | 285 | /* Insert the data at the first peer */ |
284 | GNUNET_DHT_put (peer1dht, &key, DEFAULT_PUT_REPLICATION, | 286 | GNUNET_DHT_put (peer1dht, &key, 1, |
285 | GNUNET_DHT_RO_RECORD_ROUTE, GNUNET_BLOCK_TYPE_TEST, | 287 | GNUNET_DHT_RO_RECORD_ROUTE, GNUNET_BLOCK_TYPE_TEST, |
286 | sizeof (data), data, GNUNET_TIME_UNIT_FOREVER_ABS, | 288 | sizeof (data), data, GNUNET_TIME_UNIT_FOREVER_ABS, |
287 | GNUNET_TIME_UNIT_FOREVER_REL, &put_finished, NULL); | 289 | GNUNET_TIME_UNIT_FOREVER_REL, &put_finished, NULL); |