diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-05-27 20:14:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-05-27 20:14:21 +0000 |
commit | b55ae0b50e36537b83a02941caf32a05e3403412 (patch) | |
tree | 941d6b2ce180b5b81a5a9c513dbe937f55a24953 /src/dht | |
parent | 25b5a135122c063f7ed8de74ae04d65fed180f5f (diff) | |
download | gnunet-b55ae0b50e36537b83a02941caf32a05e3403412.tar.gz gnunet-b55ae0b50e36537b83a02941caf32a05e3403412.zip |
-fixing #2340
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/dht_api.c | 2 | ||||
-rw-r--r-- | src/dht/gnunet-dht-get.c | 2 | ||||
-rw-r--r-- | src/dht/test_dht_api.c | 2 | ||||
-rw-r--r-- | src/dht/test_dht_monitor.c | 2 | ||||
-rw-r--r-- | src/dht/test_dht_multipeer.c | 2 | ||||
-rw-r--r-- | src/dht/test_dht_topo.c | 6 | ||||
-rw-r--r-- | src/dht/test_dht_twopeer.c | 4 | ||||
-rw-r--r-- | src/dht/test_dht_twopeer_get_put.c | 2 | ||||
-rw-r--r-- | src/dht/test_dht_twopeer_path_tracking.c | 2 | ||||
-rw-r--r-- | src/dht/test_dht_twopeer_put_get.c | 2 |
10 files changed, 10 insertions, 16 deletions
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c index 131070302..420eacbff 100644 --- a/src/dht/dht_api.c +++ b/src/dht/dht_api.c | |||
@@ -1135,7 +1135,6 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph) | |||
1135 | * also "GNUNET_BLOCK_evaluate". | 1135 | * also "GNUNET_BLOCK_evaluate". |
1136 | * | 1136 | * |
1137 | * @param handle handle to the DHT service | 1137 | * @param handle handle to the DHT service |
1138 | * @param timeout how long to wait for transmission of this request to the service | ||
1139 | * @param type expected type of the response object | 1138 | * @param type expected type of the response object |
1140 | * @param key the key to look up | 1139 | * @param key the key to look up |
1141 | * @param desired_replication_level estimate of how many | 1140 | * @param desired_replication_level estimate of how many |
@@ -1149,7 +1148,6 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph) | |||
1149 | */ | 1148 | */ |
1150 | struct GNUNET_DHT_GetHandle * | 1149 | struct GNUNET_DHT_GetHandle * |
1151 | GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle, | 1150 | GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle, |
1152 | struct GNUNET_TIME_Relative timeout, | ||
1153 | enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key, | 1151 | enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key, |
1154 | uint32_t desired_replication_level, | 1152 | uint32_t desired_replication_level, |
1155 | enum GNUNET_DHT_RouteOption options, const void *xquery, | 1153 | enum GNUNET_DHT_RouteOption options, const void *xquery, |
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c index 6ad4b30f8..fb185c489 100644 --- a/src/dht/gnunet-dht-get.c +++ b/src/dht/gnunet-dht-get.c | |||
@@ -186,7 +186,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
186 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining | 186 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining |
187 | (absolute_timeout), &cleanup_task, NULL); | 187 | (absolute_timeout), &cleanup_task, NULL); |
188 | get_handle = | 188 | get_handle = |
189 | GNUNET_DHT_get_start (dht_handle, timeout, query_type, &key, replication, | 189 | GNUNET_DHT_get_start (dht_handle, query_type, &key, replication, |
190 | GNUNET_DHT_RO_NONE, NULL, 0, &get_result_iterator, | 190 | GNUNET_DHT_RO_NONE, NULL, 0, &get_result_iterator, |
191 | NULL); | 191 | NULL); |
192 | 192 | ||
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c index 9c6231561..000ad3344 100644 --- a/src/dht/test_dht_api.c +++ b/src/dht/test_dht_api.c | |||
@@ -212,7 +212,7 @@ test_get (void *cls, int success) | |||
212 | retry_context.next_timeout = BASE_TIMEOUT; | 212 | retry_context.next_timeout = BASE_TIMEOUT; |
213 | 213 | ||
214 | peer->get_handle = | 214 | peer->get_handle = |
215 | GNUNET_DHT_get_start (peer->dht_handle, TOTAL_TIMEOUT, | 215 | GNUNET_DHT_get_start (peer->dht_handle, |
216 | GNUNET_BLOCK_TYPE_TEST, &hash, 1, | 216 | GNUNET_BLOCK_TYPE_TEST, &hash, 1, |
217 | GNUNET_DHT_RO_NONE, NULL, 0, &test_get_iterator, | 217 | GNUNET_DHT_RO_NONE, NULL, 0, &test_get_iterator, |
218 | NULL); | 218 | NULL); |
diff --git a/src/dht/test_dht_monitor.c b/src/dht/test_dht_monitor.c index 62210e85c..ca6704a09 100644 --- a/src/dht/test_dht_monitor.c +++ b/src/dht/test_dht_monitor.c | |||
@@ -250,7 +250,7 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
250 | GNUNET_h2s_full (&d_far->id.hashPubKey)); | 250 | GNUNET_h2s_full (&d_far->id.hashPubKey)); |
251 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: from %s\n", | 251 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: from %s\n", |
252 | GNUNET_h2s_full (&o->id.hashPubKey)); | 252 | GNUNET_h2s_full (&o->id.hashPubKey)); |
253 | get_h_far = GNUNET_DHT_get_start (hs[0], GNUNET_TIME_UNIT_FOREVER_REL, /* timeout */ | 253 | get_h_far = GNUNET_DHT_get_start (hs[0], |
254 | GNUNET_BLOCK_TYPE_TEST, /* type */ | 254 | GNUNET_BLOCK_TYPE_TEST, /* type */ |
255 | &d_far->id.hashPubKey, /*key to search */ | 255 | &d_far->id.hashPubKey, /*key to search */ |
256 | 4U, /* replication level */ | 256 | 4U, /* replication level */ |
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c index 2be938c96..ab7d90e24 100644 --- a/src/dht/test_dht_multipeer.c +++ b/src/dht/test_dht_multipeer.c | |||
@@ -621,7 +621,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
621 | GNUNET_assert (test_get->dht_handle != NULL); | 621 | GNUNET_assert (test_get->dht_handle != NULL); |
622 | outstanding_gets++; | 622 | outstanding_gets++; |
623 | test_get->get_handle = | 623 | test_get->get_handle = |
624 | GNUNET_DHT_get_start (test_get->dht_handle, GNUNET_TIME_UNIT_FOREVER_REL, | 624 | GNUNET_DHT_get_start (test_get->dht_handle, |
625 | GNUNET_BLOCK_TYPE_TEST, &key, 1, route_option, NULL, | 625 | GNUNET_BLOCK_TYPE_TEST, &key, 1, route_option, NULL, |
626 | 0, &get_result_iterator, test_get); | 626 | 0, &get_result_iterator, test_get); |
627 | test_get->task = | 627 | test_get->task = |
diff --git a/src/dht/test_dht_topo.c b/src/dht/test_dht_topo.c index ed746a583..f69f5dca9 100644 --- a/src/dht/test_dht_topo.c +++ b/src/dht/test_dht_topo.c | |||
@@ -308,7 +308,7 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
308 | GNUNET_h2s_full (&o->id.hashPubKey)); | 308 | GNUNET_h2s_full (&o->id.hashPubKey)); |
309 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " looking for %s\n", | 309 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " looking for %s\n", |
310 | GNUNET_h2s_full (&d->id.hashPubKey)); | 310 | GNUNET_h2s_full (&d->id.hashPubKey)); |
311 | get_h = GNUNET_DHT_get_start (hs[0], GNUNET_TIME_UNIT_FOREVER_REL, /* timeout */ | 311 | get_h = GNUNET_DHT_get_start (hs[0], |
312 | GNUNET_BLOCK_TYPE_TEST, /* type */ | 312 | GNUNET_BLOCK_TYPE_TEST, /* type */ |
313 | &d->id.hashPubKey, /*key to search */ | 313 | &d->id.hashPubKey, /*key to search */ |
314 | 4U, /* replication level */ | 314 | 4U, /* replication level */ |
@@ -319,7 +319,7 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
319 | { | 319 | { |
320 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " looking for %s\n", | 320 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " looking for %s\n", |
321 | GNUNET_h2s_full (&d2->id.hashPubKey)); | 321 | GNUNET_h2s_full (&d2->id.hashPubKey)); |
322 | get_h_2 = GNUNET_DHT_get_start (hs[0], GNUNET_TIME_UNIT_FOREVER_REL, /* timeout */ | 322 | get_h_2 = GNUNET_DHT_get_start (hs[0], |
323 | GNUNET_BLOCK_TYPE_TEST, /* type */ | 323 | GNUNET_BLOCK_TYPE_TEST, /* type */ |
324 | &d2->id.hashPubKey, /*key to search */ | 324 | &d2->id.hashPubKey, /*key to search */ |
325 | 4U, /* replication level */ | 325 | 4U, /* replication level */ |
@@ -328,7 +328,7 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
328 | &dht_get_id_handler, (void *)2); | 328 | &dht_get_id_handler, (void *)2); |
329 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " looking for %s\n", | 329 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " looking for %s\n", |
330 | GNUNET_h2s_full (&d_far->id.hashPubKey)); | 330 | GNUNET_h2s_full (&d_far->id.hashPubKey)); |
331 | get_h_far = GNUNET_DHT_get_start (hs[0], GNUNET_TIME_UNIT_FOREVER_REL, /* timeout */ | 331 | get_h_far = GNUNET_DHT_get_start (hs[0], |
332 | GNUNET_BLOCK_TYPE_TEST, /* type */ | 332 | GNUNET_BLOCK_TYPE_TEST, /* type */ |
333 | &d_far->id.hashPubKey, /*key to search */ | 333 | &d_far->id.hashPubKey, /*key to search */ |
334 | 4U, /* replication level */ | 334 | 4U, /* replication level */ |
diff --git a/src/dht/test_dht_twopeer.c b/src/dht/test_dht_twopeer.c index 6f2b0de18..a5e2ece4e 100644 --- a/src/dht/test_dht_twopeer.c +++ b/src/dht/test_dht_twopeer.c | |||
@@ -250,8 +250,6 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
250 | &stop_retry_get, get_context); | 250 | &stop_retry_get, get_context); |
251 | get_context->get_handle = | 251 | get_context->get_handle = |
252 | GNUNET_DHT_get_start (get_context->dht_handle, | 252 | GNUNET_DHT_get_start (get_context->dht_handle, |
253 | GNUNET_TIME_relative_multiply | ||
254 | (GNUNET_TIME_UNIT_SECONDS, 5), | ||
255 | GNUNET_BLOCK_TYPE_DHT_HELLO, | 253 | GNUNET_BLOCK_TYPE_DHT_HELLO, |
256 | &get_context->peer->hashPubKey, 1, | 254 | &get_context->peer->hashPubKey, 1, |
257 | GNUNET_DHT_RO_NONE, NULL, 0, &get_result_iterator, | 255 | GNUNET_DHT_RO_NONE, NULL, 0, &get_result_iterator, |
@@ -285,8 +283,6 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
285 | &stop_retry_get, get_context); | 283 | &stop_retry_get, get_context); |
286 | get_context->get_handle = | 284 | get_context->get_handle = |
287 | GNUNET_DHT_get_start (get_context->dht_handle, | 285 | GNUNET_DHT_get_start (get_context->dht_handle, |
288 | GNUNET_TIME_relative_multiply | ||
289 | (GNUNET_TIME_UNIT_SECONDS, 5), | ||
290 | GNUNET_BLOCK_TYPE_DHT_HELLO, | 286 | GNUNET_BLOCK_TYPE_DHT_HELLO, |
291 | &get_context->peer->hashPubKey, 1, | 287 | &get_context->peer->hashPubKey, 1, |
292 | GNUNET_DHT_RO_FIND_PEER, NULL, 0, | 288 | GNUNET_DHT_RO_FIND_PEER, NULL, 0, |
diff --git a/src/dht/test_dht_twopeer_get_put.c b/src/dht/test_dht_twopeer_get_put.c index b32428bb4..3271d046d 100644 --- a/src/dht/test_dht_twopeer_get_put.c +++ b/src/dht/test_dht_twopeer_get_put.c | |||
@@ -272,7 +272,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
272 | memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ | 272 | memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ |
273 | #endif | 273 | #endif |
274 | global_get_handle = | 274 | global_get_handle = |
275 | GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_relative_get_forever (), | 275 | GNUNET_DHT_get_start (peer2dht, |
276 | #if DNS | 276 | #if DNS |
277 | GNUNET_BLOCK_TYPE_DNS, | 277 | GNUNET_BLOCK_TYPE_DNS, |
278 | #else | 278 | #else |
diff --git a/src/dht/test_dht_twopeer_path_tracking.c b/src/dht/test_dht_twopeer_path_tracking.c index 31d4f92ae..6ecf6a381 100644 --- a/src/dht/test_dht_twopeer_path_tracking.c +++ b/src/dht/test_dht_twopeer_path_tracking.c | |||
@@ -259,7 +259,7 @@ put_finished (void *cls, int success) | |||
259 | "waiting for get response (data not found)"); | 259 | "waiting for get response (data not found)"); |
260 | memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ | 260 | memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ |
261 | global_get_handle = | 261 | global_get_handle = |
262 | GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_relative_get_forever (), | 262 | GNUNET_DHT_get_start (peer2dht, |
263 | GNUNET_BLOCK_TYPE_TEST, &key, 1, | 263 | GNUNET_BLOCK_TYPE_TEST, &key, 1, |
264 | GNUNET_DHT_RO_RECORD_ROUTE, NULL, 0, | 264 | GNUNET_DHT_RO_RECORD_ROUTE, NULL, 0, |
265 | &get_result_iterator, NULL); | 265 | &get_result_iterator, NULL); |
diff --git a/src/dht/test_dht_twopeer_put_get.c b/src/dht/test_dht_twopeer_put_get.c index e40848291..44150e3e0 100644 --- a/src/dht/test_dht_twopeer_put_get.c +++ b/src/dht/test_dht_twopeer_put_get.c | |||
@@ -266,7 +266,7 @@ put_finished (void *cls, int success) | |||
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 (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, GNUNET_TIME_UNIT_FOREVER_REL, | 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, |
271 | NULL, 0, &get_result_iterator, NULL); | 271 | NULL, 0, &get_result_iterator, NULL); |
272 | } | 272 | } |