aboutsummaryrefslogtreecommitdiff
path: root/src/service/dht/gnunet-service-dht_neighbours.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/dht/gnunet-service-dht_neighbours.c')
-rw-r--r--src/service/dht/gnunet-service-dht_neighbours.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/service/dht/gnunet-service-dht_neighbours.c b/src/service/dht/gnunet-service-dht_neighbours.c
index dbbdf13eb..836b57a23 100644
--- a/src/service/dht/gnunet-service-dht_neighbours.c
+++ b/src/service/dht/gnunet-service-dht_neighbours.c
@@ -76,7 +76,7 @@
76 * requests when we are 'perfectly' connected. 76 * requests when we are 'perfectly' connected.
77 */ 77 */
78#define DHT_MINIMUM_FIND_PEER_INTERVAL GNUNET_TIME_relative_multiply ( \ 78#define DHT_MINIMUM_FIND_PEER_INTERVAL GNUNET_TIME_relative_multiply ( \
79 GNUNET_TIME_UNIT_MINUTES, 2) 79 GNUNET_TIME_UNIT_MINUTES, 2)
80 80
81 81
82/** 82/**
@@ -89,7 +89,7 @@
89 * is half of the number given here. 89 * is half of the number given here.
90 */ 90 */
91#define DHT_AVG_FIND_PEER_INTERVAL GNUNET_TIME_relative_multiply ( \ 91#define DHT_AVG_FIND_PEER_INTERVAL GNUNET_TIME_relative_multiply ( \
92 GNUNET_TIME_UNIT_SECONDS, 6) 92 GNUNET_TIME_UNIT_SECONDS, 6)
93 93
94/** 94/**
95 * How long at most to wait for transmission of a GET request to another peer? 95 * How long at most to wait for transmission of a GET request to another peer?
@@ -1300,7 +1300,7 @@ get_target_peers (const struct GNUNET_HashCode *key,
1300static void 1300static void
1301hello_check (const struct GNUNET_DATACACHE_Block *bd) 1301hello_check (const struct GNUNET_DATACACHE_Block *bd)
1302{ 1302{
1303 struct GNUNET_PeerIdentity *pid; 1303 const struct GNUNET_PeerIdentity *pid;
1304 struct GNUNET_HELLO_Builder *b; 1304 struct GNUNET_HELLO_Builder *b;
1305 1305
1306 if (GNUNET_BLOCK_TYPE_DHT_HELLO != bd->type) 1306 if (GNUNET_BLOCK_TYPE_DHT_HELLO != bd->type)
@@ -1310,12 +1310,9 @@ hello_check (const struct GNUNET_DATACACHE_Block *bd)
1310 bd->data_size); 1310 bd->data_size);
1311 if (GNUNET_YES != disable_try_connect) 1311 if (GNUNET_YES != disable_try_connect)
1312 { 1312 {
1313 pid = GNUNET_new (struct GNUNET_PeerIdentity);
1314 GNUNET_HELLO_builder_iterate (b, 1313 GNUNET_HELLO_builder_iterate (b,
1315 pid,
1316 &GDS_try_connect, 1314 &GDS_try_connect,
1317 pid); 1315 NULL);
1318 GNUNET_free (pid);
1319 } 1316 }
1320 GNUNET_HELLO_builder_free (b); 1317 GNUNET_HELLO_builder_free (b);
1321} 1318}
@@ -2888,9 +2885,10 @@ GDS_u_receive (void *cls,
2888 */ 2885 */
2889void 2886void
2890GDS_try_connect (void *cls, 2887GDS_try_connect (void *cls,
2888 const struct GNUNET_PeerIdentity *pid,
2891 const char *uri) 2889 const char *uri)
2892{ 2890{
2893 const struct GNUNET_PeerIdentity *pid = cls; 2891 (void) cls;
2894 struct GNUNET_HashCode phash; 2892 struct GNUNET_HashCode phash;
2895 int peer_bucket; 2893 int peer_bucket;
2896 struct PeerBucket *bucket; 2894 struct PeerBucket *bucket;