From 91c4da14bcfa26a9a077d07fb9063d4460ae095e Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 11 Nov 2011 16:40:29 +0000 Subject: [PATCH] update address on receive --- src/transport/gnunet-service-transport.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index b9f4dc30f..7fd4760ef 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -125,6 +125,8 @@ process_hello_update (void *cls, const struct GNUNET_MessageHeader *hello) */ static struct GNUNET_TIME_Relative process_payload (const struct GNUNET_PeerIdentity *peer, + const struct GNUNET_HELLO_Address *address, + struct Session *session, const struct GNUNET_MessageHeader *message, const struct GNUNET_ATS_Information *ats, uint32_t ats_count) { @@ -169,6 +171,7 @@ process_payload (const struct GNUNET_PeerIdentity *peer, ap[ats_count].value = htonl ((uint32_t) GST_neighbour_get_latency (peer).rel_value); memcpy (&ap[ats_count + 1], message, ntohs (message->size)); + GNUNET_ATS_address_update (GST_ats, address, session, ap, ats_count +1 ); GST_clients_broadcast (&im->header, GNUNET_YES); return ret; @@ -269,7 +272,7 @@ plugin_env_receive_callback (void *cls, break; default: /* should be payload */ - ret = process_payload (peer, message, ats, ats_count); + ret = process_payload (peer, &address, session, message, ats, ats_count); break; } end: -- 2.25.1