aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-03-05 13:39:28 +0000
committerBart Polot <bart@net.in.tum.de>2013-03-05 13:39:28 +0000
commit0e62c9501710428cc6e27dded5262e2999b7fe56 (patch)
tree4c18258683fec77e392e0960e454fdd1849c7258 /src/dht
parent465bda20a0f4ae910487c84337ab8b47b2387d03 (diff)
downloadgnunet-0e62c9501710428cc6e27dded5262e2999b7fe56.tar.gz
gnunet-0e62c9501710428cc6e27dded5262e2999b7fe56.zip
- dont offer hellos if not going to use them
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 79f3e64a3..f0e18f48f 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -1975,17 +1975,16 @@ handle_dht_p2p_result (void *cls, const struct GNUNET_PeerIdentity *peer,
1975 GNUNET_break_op (0); 1975 GNUNET_break_op (0);
1976 return GNUNET_YES; 1976 return GNUNET_YES;
1977 } 1977 }
1978 if (0 != memcmp (&my_identity, &pid, sizeof (struct GNUNET_PeerIdentity))) 1978 if ((GNUNET_YES != disable_try_connect) &&
1979 0 != memcmp (&my_identity, &pid, sizeof (struct GNUNET_PeerIdentity)))
1979 { 1980 {
1980 bucket = find_bucket (&pid.hashPubKey); 1981 bucket = find_bucket (&pid.hashPubKey);
1981 if ((bucket >= 0) && (k_buckets[bucket].peers_size < bucket_size)) 1982 if ((bucket >= 0) &&
1983 (k_buckets[bucket].peers_size < bucket_size) &&
1984 (NULL != GDS_transport_handle))
1982 { 1985 {
1983 if (NULL != GDS_transport_handle) 1986 GNUNET_TRANSPORT_offer_hello (GDS_transport_handle, h, NULL, NULL);
1984 { 1987 GNUNET_TRANSPORT_try_connect (GDS_transport_handle, &pid, NULL, NULL); /*FIXME TRY_CONNECT change */
1985 GNUNET_TRANSPORT_offer_hello (GDS_transport_handle, h, NULL, NULL);
1986 if (GNUNET_YES != disable_try_connect)
1987 GNUNET_TRANSPORT_try_connect (GDS_transport_handle, &pid, NULL, NULL); /*FIXME TRY_CONNECT change */
1988 }
1989 } 1988 }
1990 } 1989 }
1991 } 1990 }