#endif
uint32_t distance;
+ /* Check for connect to self message */
+ if (0 == memcmp(&my_identity, peer, sizeof(struct GNUNET_PeerIdentity)))
+ return;
+
distance = get_atsi_distance (atsi);
if ((distance == DIRECT_NEIGHBOR_COST) &&
(GNUNET_CONTAINER_multihashmap_get(direct_neighbors, &peer->hashPubKey) == NULL))
"%s: Receives core peer disconnect message!\n", "dv");
#endif
+ /* Check for disconnect from self message */
+ if (0 == memcmp(&my_identity, peer, sizeof(struct GNUNET_PeerIdentity)))
+ return;
+
neighbor =
GNUNET_CONTAINER_multihashmap_get (direct_neighbors, &peer->hashPubKey);
static void
init_notify_peer2 (void *cls,
- struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ struct GNUNET_CORE_Handle *server,
+ const struct GNUNET_PeerIdentity *my_identity,
+ const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
{
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
static void
init_notify_peer1 (void *cls,
- struct GNUNET_CORE_Handle *server,
- const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ struct GNUNET_CORE_Handle *server,
+ const struct GNUNET_PeerIdentity *my_identity,
+ const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
{
total_server_connections++;
#if VERBOSE
struct TestMessageContext *temp_context;
#endif
uint32_t distance;
+
+ if (0 == memcmp(&d->id, peer, sizeof(struct GNUNET_PeerIdentity)))
+ return;
+
distance = get_atsi_distance(atsi);
#if VERBOSE