diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-30 18:47:17 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-30 18:47:17 +0200 |
commit | adef29b3ed00afd42669ae35a73951c59f08a41b (patch) | |
tree | c8d6c7f60716c551b587aed7a1efe0d6e756833f /src/dht/gnunet-service-dht_neighbours.c | |
parent | f5a18b7466f342ac9624adcdb65f104aef8ecb5e (diff) | |
download | gnunet-adef29b3ed00afd42669ae35a73951c59f08a41b.tar.gz gnunet-adef29b3ed00afd42669ae35a73951c59f08a41b.zip |
add proximity considerations to datacache
Diffstat (limited to 'src/dht/gnunet-service-dht_neighbours.c')
-rw-r--r-- | src/dht/gnunet-service-dht_neighbours.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index 0309bea88..b120091af 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c | |||
@@ -421,7 +421,7 @@ static struct GNUNET_ATS_ConnectivityHandle *ats_ch; | |||
421 | * Find the optimal bucket for this key. | 421 | * Find the optimal bucket for this key. |
422 | * | 422 | * |
423 | * @param hc the hashcode to compare our identity to | 423 | * @param hc the hashcode to compare our identity to |
424 | * @return the proper bucket index, or GNUNET_SYSERR | 424 | * @return the proper bucket index, or #GNUNET_SYSERR |
425 | * on error (same hashcode) | 425 | * on error (same hashcode) |
426 | */ | 426 | */ |
427 | static int | 427 | static int |
@@ -941,9 +941,9 @@ get_distance (const struct GNUNET_HashCode *target, | |||
941 | * @return #GNUNET_YES if node location is closest, | 941 | * @return #GNUNET_YES if node location is closest, |
942 | * #GNUNET_NO otherwise. | 942 | * #GNUNET_NO otherwise. |
943 | */ | 943 | */ |
944 | static int | 944 | int |
945 | am_closest_peer (const struct GNUNET_HashCode *key, | 945 | GDS_am_closest_peer (const struct GNUNET_HashCode *key, |
946 | const struct GNUNET_CONTAINER_BloomFilter *bloom) | 946 | const struct GNUNET_CONTAINER_BloomFilter *bloom) |
947 | { | 947 | { |
948 | int bits; | 948 | int bits; |
949 | int other_bits; | 949 | int other_bits; |
@@ -1803,7 +1803,7 @@ handle_dht_p2p_put (void *cls, | |||
1803 | payload); | 1803 | payload); |
1804 | /* store locally */ | 1804 | /* store locally */ |
1805 | if ((0 != (options & GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE)) || | 1805 | if ((0 != (options & GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE)) || |
1806 | (am_closest_peer (&put->key, bf))) | 1806 | (GDS_am_closest_peer (&put->key, bf))) |
1807 | GDS_DATACACHE_handle_put (GNUNET_TIME_absolute_ntoh (put->expiration_time), | 1807 | GDS_DATACACHE_handle_put (GNUNET_TIME_absolute_ntoh (put->expiration_time), |
1808 | &put->key, | 1808 | &put->key, |
1809 | putlen, | 1809 | putlen, |
@@ -2122,7 +2122,7 @@ handle_dht_p2p_get (void *cls, | |||
2122 | (unsigned int) ntohl (get->hop_count)); | 2122 | (unsigned int) ntohl (get->hop_count)); |
2123 | /* local lookup (this may update the reply_bf) */ | 2123 | /* local lookup (this may update the reply_bf) */ |
2124 | if ((0 != (options & GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE)) || | 2124 | if ((0 != (options & GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE)) || |
2125 | (am_closest_peer (&get->key, | 2125 | (GDS_am_closest_peer (&get->key, |
2126 | peer_bf))) | 2126 | peer_bf))) |
2127 | { | 2127 | { |
2128 | if ((0 != (options & GNUNET_DHT_RO_FIND_PEER))) | 2128 | if ((0 != (options & GNUNET_DHT_RO_FIND_PEER))) |