X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore_api.c;h=e9a38271bf317cce14072f629e842e521ca4fa6d;hb=9706e822ff61a85bf2353d2c233eb766ffc13323;hp=57bf64ad72bb406314347c81909e309a2a659d1d;hpb=e054285d845aad88df678b60ee532d71d5115f4b;p=oweals%2Fgnunet.git diff --git a/src/core/core_api.c b/src/core/core_api.c index 57bf64ad7..e9a38271b 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -1730,25 +1730,11 @@ GNUNET_CORE_peer_request_connect (struct GNUNET_CORE_Handle *h, struct GNUNET_CORE_PeerRequestHandle *ret; struct ControlMessage *cm; struct ConnectMessage *msg; - struct PeerRecord *pr; - static struct GNUNET_TRANSPORT_ATS_Information distance[2]; if (NULL != GNUNET_CONTAINER_multihashmap_get (h->peers, &peer->hashPubKey)) - { - pr = GNUNET_CONTAINER_multihashmap_get(h->peers, &peer->hashPubKey); - GNUNET_assert(pr != NULL); - distance[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); - distance[0].value = htonl (1); - distance[1].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR); - distance[1].value = htonl (0); + return NULL; /* Already connected, means callback should have happened already! */ - if (NULL != h->connects) - h->connects (h->cls, - &pr->peer, - &distance[0]); - return NULL; - } cm = GNUNET_malloc (sizeof (struct ControlMessage) + sizeof (struct ConnectMessage));