aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2011-02-17 15:13:38 +0000
committerNathan S. Evans <evans@in.tum.de>2011-02-17 15:13:38 +0000
commitc42d09fc483b38b61b344f01da1a4678a18d337d (patch)
treea912c19b1bf0597f64687faea30846037d9fd226 /src/dht/gnunet-service-dht.c
parent1bb462f5dae340f2e989cb615fb60420b6ef0b41 (diff)
fix
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r--src/dht/gnunet-service-dht.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index a1c3c69a0e..72cd7e39f8 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -1545,15 +1545,16 @@ add_peer (const struct GNUNET_PeerIdentity *peer,
k_buckets[bucket].tail, new_peer);
k_buckets[bucket].peers_size++;
+#if DO_UPDATE_PREFERENCE
if ((GNUNET_CRYPTO_hash_matching_bits
(&my_identity.hashPubKey, &peer->hashPubKey) > 0)
&& (k_buckets[bucket].peers_size <= bucket_size))
{
-#if DO_UPDATE_PREFERENCE
+
new_peer->preference_task =
GNUNET_SCHEDULER_add_now (&update_core_preference, new_peer);
-#endif
}
+#endif
return new_peer;
}