gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated (f80d6d695 -> 5b4c1620b)


From: gnunet
Subject: [gnunet] branch master updated (f80d6d695 -> 5b4c1620b)
Date: Tue, 30 Nov 2021 20:05:48 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository gnunet.

    from f80d6d695 ignore prepared statement failures if statement is already 
known to enable connection pooling
     new 851f794c6 -nicer code
     new 5b4c1620b -fix

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/include/gnunet_dht_service.h |  5 +++--
 src/util/container_bloomfilter.c | 26 ++++++++++----------------
 2 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index 95d30ae6f..34628e1fb 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -82,8 +82,9 @@ enum GNUNET_DHT_RouteOption
   GNUNET_DHT_RO_NONE = 0,
 
   /**
-   * Each peer along the way should look at 'enc' (otherwise
-   * only the k-peers closest to the key should look at it).
+   * Each peer along the way should process the request (otherwise
+   * only peers locally closest to the key when the random walk
+   * is over should look at it).
    */
   GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE = 1,
 
diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c
index d7460043d..d89b46252 100644
--- a/src/util/container_bloomfilter.c
+++ b/src/util/container_bloomfilter.c
@@ -380,39 +380,33 @@ iterateBits (const struct GNUNET_CONTAINER_BloomFilter 
*bf,
              void *arg,
              const struct GNUNET_HashCode *key)
 {
-  struct GNUNET_HashCode tmp[2];
+  struct GNUNET_HashCode tmp = *key;
   int bitCount;
-  unsigned int round;
   unsigned int slot = 0;
 
   bitCount = bf->addressesPerElement;
-  tmp[0] = *key;
-  round = 0;
   GNUNET_assert (bf->bitArraySize > 0);
   GNUNET_assert (bf->bitArraySize * 8LL > bf->bitArraySize);
   while (bitCount > 0)
   {
-    while (slot < (sizeof(struct GNUNET_HashCode) / sizeof(uint32_t)))
+    while ( (0 != bitCount) &&
+            (slot < (sizeof(struct GNUNET_HashCode) / sizeof(uint32_t))) )
     {
       if (GNUNET_YES !=
           callback (arg,
                     bf,
-                    ntohl ((((uint32_t *) &tmp[round & 1])[slot]))
+                    ntohl ((((uint32_t *) &tmp)[slot]))
                     % ((bf->bitArraySize * 8LL))))
         return;
       slot++;
       bitCount--;
-      if (bitCount == 0)
-        break;
-    }
-    if (bitCount > 0)
-    {
-      GNUNET_CRYPTO_hash (&tmp[round & 1],
-                          sizeof(struct GNUNET_HashCode),
-                          &tmp[(round + 1) & 1]);
-      round++;
-      slot = 0;
     }
+    if (0 == bitCount)
+      break;
+    GNUNET_CRYPTO_hash (&tmp,
+                        sizeof(tmp),
+                        &tmp);
+    slot = 0;
   }
 }
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]