[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17744 - gnunet/src/dht
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17744 - gnunet/src/dht |
Date: |
Tue, 25 Oct 2011 15:28:37 +0200 |
Author: grothoff
Date: 2011-10-25 15:28:36 +0200 (Tue, 25 Oct 2011)
New Revision: 17744
Modified:
gnunet/src/dht/gnunet-service-dht_neighbours.c
Log:
ob1
Modified: gnunet/src/dht/gnunet-service-dht_neighbours.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_neighbours.c 2011-10-25 13:24:36 UTC
(rev 17743)
+++ gnunet/src/dht/gnunet-service-dht_neighbours.c 2011-10-25 13:28:36 UTC
(rev 17744)
@@ -1022,7 +1022,7 @@
/* greedy selection (closest peer that is not in bloomfilter) */
smallest_distance = UINT_MAX;
chosen = NULL;
- for (bc = 0; bc < closest_bucket; bc++)
+ for (bc = 0; bc <= closest_bucket; bc++)
{
pos = k_buckets[bc].head;
count = 0;
@@ -1065,7 +1065,7 @@
/* select "random" peer */
/* count number of peers that are available and not filtered */
count = 0;
- for (bc = 0; bc < closest_bucket; bc++)
+ for (bc = 0; bc <= closest_bucket; bc++)
{
pos = k_buckets[bc].head;
while ((pos != NULL) && (count < bucket_size))
@@ -1100,7 +1100,7 @@
/* Now actually choose a peer */
selected = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, count);
count = 0;
- for (bc = 0; bc < closest_bucket; bc++)
+ for (bc = 0; bc <= closest_bucket; bc++)
{
pos = k_buckets[bc].head;
while ((pos != NULL) && (count < bucket_size))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17744 - gnunet/src/dht,
gnunet <=