-fixing #2340
authorChristian Grothoff <christian@grothoff.org>
Sun, 27 May 2012 20:14:21 +0000 (20:14 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 27 May 2012 20:14:21 +0000 (20:14 +0000)
14 files changed:
src/dht/dht_api.c
src/dht/gnunet-dht-get.c
src/dht/test_dht_api.c
src/dht/test_dht_monitor.c
src/dht/test_dht_multipeer.c
src/dht/test_dht_topo.c
src/dht/test_dht_twopeer.c
src/dht/test_dht_twopeer_get_put.c
src/dht/test_dht_twopeer_path_tracking.c
src/dht/test_dht_twopeer_put_get.c
src/fs/gnunet-service-fs_pr.c
src/gns/gnunet-service-gns_resolver.c
src/include/gnunet_dht_service.h
src/mesh/gnunet-service-mesh.c

index 131070302d7ea1ea9cbd796cee53eb12bfedc1f9..420eacbffdb95842f1fad45f5a8ad880abce5dab 100644 (file)
@@ -1135,7 +1135,6 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph)
  * also "GNUNET_BLOCK_evaluate".
  *
  * @param handle handle to the DHT service
- * @param timeout how long to wait for transmission of this request to the service
  * @param type expected type of the response object
  * @param key the key to look up
  * @param desired_replication_level estimate of how many
@@ -1149,7 +1148,6 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph)
  */
 struct GNUNET_DHT_GetHandle *
 GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
-                      struct GNUNET_TIME_Relative timeout,
                       enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key,
                       uint32_t desired_replication_level,
                       enum GNUNET_DHT_RouteOption options, const void *xquery,
index 6ad4b30f8e05d0b84eb02425effc663037780b18..fb185c489b18909d08e88ab09d6f65acff56c6dd 100644 (file)
@@ -186,7 +186,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
                                 (absolute_timeout), &cleanup_task, NULL);
   get_handle =
-      GNUNET_DHT_get_start (dht_handle, timeout, query_type, &key, replication,
+      GNUNET_DHT_get_start (dht_handle, query_type, &key, replication,
                             GNUNET_DHT_RO_NONE, NULL, 0, &get_result_iterator,
                             NULL);
 
index 9c6231561cd63331d1b55f20dc1329bca10acda1..000ad33443a18c506a1cdaae64766b4f394d3086 100644 (file)
@@ -212,7 +212,7 @@ test_get (void *cls, int success)
   retry_context.next_timeout = BASE_TIMEOUT;
 
   peer->get_handle =
-      GNUNET_DHT_get_start (peer->dht_handle, TOTAL_TIMEOUT,
+      GNUNET_DHT_get_start (peer->dht_handle, 
                             GNUNET_BLOCK_TYPE_TEST, &hash, 1,
                             GNUNET_DHT_RO_NONE, NULL, 0, &test_get_iterator,
                             NULL);
index 62210e85c954720486605b93b8fb6d6dcb38c6b8..ca6704a09938a32fedf044e01f2a65be21240e79 100644 (file)
@@ -250,7 +250,7 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
               GNUNET_h2s_full (&d_far->id.hashPubKey));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test:        from %s\n",
               GNUNET_h2s_full (&o->id.hashPubKey));
-  get_h_far = GNUNET_DHT_get_start (hs[0], GNUNET_TIME_UNIT_FOREVER_REL,        /* timeout */
+  get_h_far = GNUNET_DHT_get_start (hs[0], 
                                     GNUNET_BLOCK_TYPE_TEST,     /* type */
                                     &d_far->id.hashPubKey,      /*key to search */
                                     4U, /* replication level */
index 2be938c96558b49aecaab90f2ff892583f1743af..ab7d90e24e7c8403d15bc2c3c43335cec6d8eb51 100644 (file)
@@ -621,7 +621,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_assert (test_get->dht_handle != NULL);
   outstanding_gets++;
   test_get->get_handle =
-      GNUNET_DHT_get_start (test_get->dht_handle, GNUNET_TIME_UNIT_FOREVER_REL,
+      GNUNET_DHT_get_start (test_get->dht_handle, 
                             GNUNET_BLOCK_TYPE_TEST, &key, 1, route_option, NULL,
                             0, &get_result_iterator, test_get);
   test_get->task =
index ed746a58366554b3e7fed70406decd2e209b8a03..f69f5dca983708fe92c68ccb7a012c9fa342b81c 100644 (file)
@@ -308,7 +308,7 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
               GNUNET_h2s_full (&o->id.hashPubKey));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  looking for %s\n",
               GNUNET_h2s_full (&d->id.hashPubKey));
-  get_h = GNUNET_DHT_get_start (hs[0], GNUNET_TIME_UNIT_FOREVER_REL,    /* timeout */
+  get_h = GNUNET_DHT_get_start (hs[0], 
                                 GNUNET_BLOCK_TYPE_TEST, /* type */
                                 &d->id.hashPubKey,      /*key to search */
                                 4U,     /* replication level */
@@ -319,7 +319,7 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  looking for %s\n",
                 GNUNET_h2s_full (&d2->id.hashPubKey));
-    get_h_2 = GNUNET_DHT_get_start (hs[0], GNUNET_TIME_UNIT_FOREVER_REL,  /* timeout */
+    get_h_2 = GNUNET_DHT_get_start (hs[0],
                                     GNUNET_BLOCK_TYPE_TEST,       /* type */
                                     &d2->id.hashPubKey,   /*key to search */
                                     4U,   /* replication level */
@@ -328,7 +328,7 @@ do_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                     &dht_get_id_handler, (void *)2);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  looking for %s\n",
                 GNUNET_h2s_full (&d_far->id.hashPubKey));
-    get_h_far = GNUNET_DHT_get_start (hs[0], GNUNET_TIME_UNIT_FOREVER_REL,        /* timeout */
+    get_h_far = GNUNET_DHT_get_start (hs[0], 
                                       GNUNET_BLOCK_TYPE_TEST,     /* type */
                                       &d_far->id.hashPubKey,      /*key to search */
                                       4U, /* replication level */
index 6f2b0de18e07e652e6b9e93e512bc96f64e9daa0..a5e2ece4e88ca97ab9c91c1bc3b5baedf17250ce 100644 (file)
@@ -250,8 +250,6 @@ get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                     &stop_retry_get, get_context);
   get_context->get_handle =
       GNUNET_DHT_get_start (get_context->dht_handle,
-                            GNUNET_TIME_relative_multiply
-                            (GNUNET_TIME_UNIT_SECONDS, 5),
                             GNUNET_BLOCK_TYPE_DHT_HELLO,
                             &get_context->peer->hashPubKey, 1,
                             GNUNET_DHT_RO_NONE, NULL, 0, &get_result_iterator,
@@ -285,8 +283,6 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                     &stop_retry_get, get_context);
   get_context->get_handle =
       GNUNET_DHT_get_start (get_context->dht_handle,
-                            GNUNET_TIME_relative_multiply
-                            (GNUNET_TIME_UNIT_SECONDS, 5),
                             GNUNET_BLOCK_TYPE_DHT_HELLO,
                             &get_context->peer->hashPubKey, 1,
                             GNUNET_DHT_RO_FIND_PEER, NULL, 0,
index b32428bb4ec9696f0a42562c2efbe4d9f15f05d1..3271d046d94c711d9f12d4e2ed7ae1ef9a0aacec 100644 (file)
@@ -272,7 +272,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   memset (&key, 42, sizeof (GNUNET_HashCode));  /* Set the key to the same thing as when data was inserted */
 #endif
   global_get_handle =
-      GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_relative_get_forever (),
+      GNUNET_DHT_get_start (peer2dht, 
 #if DNS
                             GNUNET_BLOCK_TYPE_DNS,
 #else
index 31d4f92ae6fb9dcb1addb3e79cb84257212610e5..6ecf6a3818b88229738c05d1c14b429b10bd6ae1 100644 (file)
@@ -259,7 +259,7 @@ put_finished (void *cls, int success)
                                     "waiting for get response (data not found)");
   memset (&key, 42, sizeof (GNUNET_HashCode));  /* Set the key to the same thing as when data was inserted */
   global_get_handle =
-      GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_relative_get_forever (),
+      GNUNET_DHT_get_start (peer2dht, 
                             GNUNET_BLOCK_TYPE_TEST, &key, 1,
                             GNUNET_DHT_RO_RECORD_ROUTE, NULL, 0,
                             &get_result_iterator, NULL);
index e4084829175cce8155a090207f1a8b9fed509ab9..44150e3e00fae65a62863d3c218b96fa4efc77c6 100644 (file)
@@ -266,7 +266,7 @@ put_finished (void *cls, int success)
 
   memset (&key, 42, sizeof (GNUNET_HashCode));  /* Set the key to the same thing as when data was inserted */
   global_get_handle =
-      GNUNET_DHT_get_start (peer2dht, GNUNET_TIME_UNIT_FOREVER_REL,
+      GNUNET_DHT_get_start (peer2dht, 
                             GNUNET_BLOCK_TYPE_TEST, &key, 1, GNUNET_DHT_RO_NONE,
                             NULL, 0, &get_result_iterator, NULL);
 }
index 5ae011c464a1fda7f46853074ea7034897ff2f59..8ca4121a5373535cfd37788b28dafb8c76963597 100644 (file)
@@ -1082,7 +1082,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr)
     xquery_size += sizeof (struct GNUNET_PeerIdentity);
   }
   pr->gh =
-      GNUNET_DHT_get_start (GSF_dht, GNUNET_TIME_UNIT_FOREVER_REL,
+      GNUNET_DHT_get_start (GSF_dht, 
                             pr->public_data.type, &pr->public_data.query,
                             5 /* DEFAULT_GET_REPLICATION */ ,
                             GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE,
index 56456ef99768d3a63627de0071ea5c2e112c3f69..0f65390eead15a568a8a1fff549e90d8c746da37 100644 (file)
@@ -332,7 +332,6 @@ process_auth_discovery_ns_result(void* cls,
     
     GNUNET_assert(gph->get_handle == NULL);
     gph->get_handle = GNUNET_DHT_get_start(dht_handle,
-                                           GNUNET_TIME_UNIT_FOREVER_REL,
                                            GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
                                            &lookup_key,
                                            DHT_GNS_REPLICATION_LEVEL,
@@ -863,7 +862,6 @@ resolve_record_dht(struct ResolverHandle *rh)
   
   GNUNET_assert(rh->get_handle == NULL);
   rh->get_handle = GNUNET_DHT_get_start(dht_handle, 
-                       GNUNET_TIME_UNIT_FOREVER_REL,
                        GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
                        &lookup_key,
                        DHT_GNS_REPLICATION_LEVEL,
@@ -1739,7 +1737,6 @@ resolve_delegation_dht(struct ResolverHandle *rh)
   
   GNUNET_assert(rh->get_handle == NULL);
   rh->get_handle = GNUNET_DHT_get_start(dht_handle,
-                       GNUNET_TIME_UNIT_FOREVER_REL,
                        GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
                        &lookup_key,
                        DHT_GNS_REPLICATION_LEVEL,
index 8bfa9c59a64dc240fe54554e1b5cf01dafe7ae84..6606acb7dcddf483803c52972c68dc323a1e3548 100644 (file)
@@ -220,8 +220,6 @@ typedef void (*GNUNET_DHT_GetIterator) (void *cls,
  * also "GNUNET_BLOCK_evaluate".
  *
  * @param handle handle to the DHT service
- * @param timeout how long to wait for transmission of this request to the service
- *                FIXME: this argument should probably be removed in the medium term...
  * @param type expected type of the response object
  * @param key the key to look up
  * @param desired_replication_level estimate of how many
@@ -236,7 +234,6 @@ typedef void (*GNUNET_DHT_GetIterator) (void *cls,
  */
 struct GNUNET_DHT_GetHandle *
 GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
-                      struct GNUNET_TIME_Relative timeout,
                       enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key,
                       uint32_t desired_replication_level,
                       enum GNUNET_DHT_RouteOption options, const void *xquery,
index 7b52a7d4f7c51dc91d22440f5fa2ea5479e52a3c..d278c2039deee13e858854808655ee8578c1fbdb 100644 (file)
@@ -1604,7 +1604,6 @@ peer_info_connect (struct MeshPeerInfo *peer, struct MeshTunnel *t)
                 "  Starting DHT GET for peer %s\n", GNUNET_i2s (&id));
     peer->dhtgetcls = path_info;
     peer->dhtget = GNUNET_DHT_get_start (dht_handle,    /* handle */
-                                         GNUNET_TIME_UNIT_FOREVER_REL,  /* timeout */
                                          GNUNET_BLOCK_TYPE_TEST,        /* type */
                                          &id.hashPubKey,        /* key to search */
                                          10,     /* replication level */
@@ -4284,7 +4283,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " looking in DHT for %s\n",
               GNUNET_h2s (&hash));
   t->dht_get_type =
-      GNUNET_DHT_get_start (dht_handle, GNUNET_TIME_UNIT_FOREVER_REL,
+      GNUNET_DHT_get_start (dht_handle, 
                             GNUNET_BLOCK_TYPE_TEST, &hash, 10,
                             GNUNET_DHT_RO_RECORD_ROUTE |
                             GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, NULL, 0,