From 068bd6929580eb6521c7ac40c8ae05eb632f6c58 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 22 Jan 2010 17:15:29 +0000 Subject: [PATCH] set last_distance --- src/core/gnunet-service-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 842197fb1..a3694e582 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c @@ -526,7 +526,6 @@ struct Neighbour /** * What was the last distance to this peer as reported by the transports? - * (FIXME: actually set this!) */ uint32_t last_distance; @@ -2746,6 +2745,7 @@ handle_transport_receive (void *cls, return; } n->last_latency = latency; + n->last_distance = distance; up = (n->status == PEER_STATE_KEY_CONFIRMED); type = ntohs (message->type); size = ntohs (message->size); @@ -2936,6 +2936,7 @@ handle_transport_notify_connect (void *cls, neighbour_count++; n->peer = *peer; n->last_latency = latency; + n->last_distance = distance; GNUNET_CRYPTO_aes_create_session_key (&n->encrypt_key); n->encrypt_key_created = now; n->set_key_retry_frequency = INITIAL_SET_KEY_RETRY_FREQUENCY; -- 2.25.1