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; } _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn