diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-11-08 09:27:25 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-11-08 09:27:25 +0000 |
commit | ddf009c6d6b00878994e53af4cdc65ce6a2a61fa (patch) | |
tree | 5cdfe97eeca431fbe7c34d247b4c19b7bfe41ea9 /src | |
parent | f8c0f7d5c566bbddc2909eceeb63e6ecee591d70 (diff) | |
download | gnunet-ddf009c6d6b00878994e53af4cdc65ce6a2a61fa.tar.gz gnunet-ddf009c6d6b00878994e53af4cdc65ce6a2a61fa.zip |
transport notifies about addresses in use
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index e7d458e7f..e6b298f4f 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -1148,6 +1148,9 @@ send_switch_address_continuation (void *cls, | |||
1148 | GNUNET_ATS_suggest_address (GST_ats, &n->id); | 1148 | GNUNET_ATS_suggest_address (GST_ats, &n->id); |
1149 | return; | 1149 | return; |
1150 | } | 1150 | } |
1151 | /* Tell ATS that switching addresses was successful */ | ||
1152 | GNUNET_ATS_address_in_use (GST_ats, &n->id, n->plugin_name, n->addr, | ||
1153 | n->addrlen, n->addr, GNUNET_YES); | ||
1151 | } | 1154 | } |
1152 | 1155 | ||
1153 | /** | 1156 | /** |
@@ -1314,6 +1317,14 @@ GST_neighbours_switch_to_address_3way (const struct GNUNET_PeerIdentity *peer, | |||
1314 | n->addr, | 1317 | n->addr, |
1315 | n->addrlen, | 1318 | n->addrlen, |
1316 | GNUNET_NO); | 1319 | GNUNET_NO); |
1320 | /* This will be a connection switch, tell ATS about it */ | ||
1321 | if (n->state == S_CONNECTED) | ||
1322 | { | ||
1323 | GNUNET_ATS_address_in_use (GST_ats, &n->id, n->plugin_name, n->addr, | ||
1324 | n->addrlen, n->addr, GNUNET_NO); | ||
1325 | } | ||
1326 | |||
1327 | /* set new address */ | ||
1317 | GNUNET_free_non_null (n->addr); | 1328 | GNUNET_free_non_null (n->addr); |
1318 | n->addr = GNUNET_malloc (address_len); | 1329 | n->addr = GNUNET_malloc (address_len); |
1319 | memcpy (n->addr, address, address_len); | 1330 | memcpy (n->addr, address, address_len); |