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_datacache.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_datacache.c')
-rw-r--r-- | src/dht/gnunet-service-dht_datacache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dht/gnunet-service-dht_datacache.c b/src/dht/gnunet-service-dht_datacache.c index 36047d561..81b7184ed 100644 --- a/src/dht/gnunet-service-dht_datacache.c +++ b/src/dht/gnunet-service-dht_datacache.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_datacache_lib.h" | 27 | #include "gnunet_datacache_lib.h" |
28 | #include "gnunet-service-dht_datacache.h" | 28 | #include "gnunet-service-dht_datacache.h" |
29 | #include "gnunet-service-dht_neighbours.h" | ||
29 | #include "gnunet-service-dht_routing.h" | 30 | #include "gnunet-service-dht_routing.h" |
30 | #include "gnunet-service-dht.h" | 31 | #include "gnunet-service-dht.h" |
31 | 32 | ||
@@ -79,10 +80,13 @@ GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration, | |||
79 | } | 80 | } |
80 | /* Put size is actual data size plus struct overhead plus path length (if any) */ | 81 | /* Put size is actual data size plus struct overhead plus path length (if any) */ |
81 | GNUNET_STATISTICS_update (GDS_stats, | 82 | GNUNET_STATISTICS_update (GDS_stats, |
82 | gettext_noop ("# ITEMS stored in datacache"), 1, | 83 | gettext_noop ("# ITEMS stored in datacache"), |
84 | 1, | ||
83 | GNUNET_NO); | 85 | GNUNET_NO); |
84 | r = GNUNET_DATACACHE_put (datacache, | 86 | r = GNUNET_DATACACHE_put (datacache, |
85 | key, | 87 | key, |
88 | GDS_am_closest_peer (key, | ||
89 | NULL), | ||
86 | data_size, | 90 | data_size, |
87 | data, | 91 | data, |
88 | type, | 92 | type, |