gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r6449 - GNUnet/src/applications/dht/module


From: gnunet
Subject: [GNUnet-SVN] r6449 - GNUnet/src/applications/dht/module
Date: Sun, 24 Feb 2008 22:09:33 -0700 (MST)

Author: grothoff
Date: 2008-02-24 22:09:33 -0700 (Sun, 24 Feb 2008)
New Revision: 6449

Modified:
   GNUnet/src/applications/dht/module/table.c
Log:
fix

Modified: GNUnet/src/applications/dht/module/table.c
===================================================================
--- GNUnet/src/applications/dht/module/table.c  2008-02-25 04:44:54 UTC (rev 
6448)
+++ GNUnet/src/applications/dht/module/table.c  2008-02-25 05:09:33 UTC (rev 
6449)
@@ -272,13 +272,18 @@
   unsigned int index;
   int i;
 
+  if (0 == memcmp(peer,
+                 coreAPI->myIdentity,
+                 sizeof(GNUNET_PeerIdentity)))
+    return NULL; /* myself! */
   index = get_bit_distance (&peer->hashPubKey,
                             &coreAPI->myIdentity->hashPubKey);
   i = bucketCount - 1;
   while ((buckets[i].bstart >= index) && (i > 0))
     i--;
-  if ((buckets[i].bstart < index) && (buckets[i].bend >= index))
+  if ((buckets[i].bstart <= index) && (buckets[i].bend >= index))
     return &buckets[i];
+  GNUNET_GE_BREAK(NULL, 0);
   return NULL;
 }
 





reply via email to

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