From: Matthias Wachs Date: Mon, 7 Nov 2011 15:02:24 +0000 (+0000) Subject: (no commit message) X-Git-Tag: initial-import-from-subversion-38251~16012 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=20379063dd3ee6f3b7091a3d89e572886b295264;p=oweals%2Fgnunet.git --- diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 4f5b8ca39..32ac7c05d 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -860,6 +860,12 @@ disconnect_neighbour (struct NeighbourMapEntry *n) GNUNET_i2s (&n->id)); } + if (is_connected(n)) + { + GNUNET_ATS_address_in_use (GST_ats, &n->id, n->plugin_name, + n->addr, n->addrlen, n->session, GNUNET_NO); + } + if (is_disconnecting (n)) return; @@ -2038,8 +2044,8 @@ GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message, if (!is_connected (n)) change_state (n, S_CONNECTED); - GNUNET_ATS_address_in_use (GST_ats, peer, plugin_name, sender_address, - sender_address_len, session, GNUNET_YES); + GNUNET_ATS_address_in_use (GST_ats, &n->id, n->plugin_name, n->addr, + n->addrlen, n->addr, GNUNET_YES); #if DEBUG_TRANSPORT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, @@ -2156,8 +2162,8 @@ GST_neighbours_handle_ack (const struct GNUNET_MessageHeader *message, was_connected = is_connected (n); change_state (n, S_CONNECTED); - GNUNET_ATS_address_in_use (GST_ats, peer, plugin_name, sender_address, - sender_address_len, session, GNUNET_YES); + GNUNET_ATS_address_in_use (GST_ats, &n->id, n->plugin_name, n->addr, + n->addrlen, n->addr, GNUNET_YES); GST_neighbours_set_incoming_quota (&n->id, n->bandwidth_in);