diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-01-22 17:15:29 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-01-22 17:15:29 +0000 |
commit | 068bd6929580eb6521c7ac40c8ae05eb632f6c58 (patch) | |
tree | c416d24a5d9959d861557fcbcbe4014791f597f5 /src | |
parent | 03527b28e50546268ff4a3ae051b0f9ca2ca7df5 (diff) | |
download | gnunet-068bd6929580eb6521c7ac40c8ae05eb632f6c58.tar.gz gnunet-068bd6929580eb6521c7ac40c8ae05eb632f6c58.zip |
set last_distance
Diffstat (limited to 'src')
-rw-r--r-- | src/core/gnunet-service-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 | |||
526 | 526 | ||
527 | /** | 527 | /** |
528 | * What was the last distance to this peer as reported by the transports? | 528 | * What was the last distance to this peer as reported by the transports? |
529 | * (FIXME: actually set this!) | ||
530 | */ | 529 | */ |
531 | uint32_t last_distance; | 530 | uint32_t last_distance; |
532 | 531 | ||
@@ -2746,6 +2745,7 @@ handle_transport_receive (void *cls, | |||
2746 | return; | 2745 | return; |
2747 | } | 2746 | } |
2748 | n->last_latency = latency; | 2747 | n->last_latency = latency; |
2748 | n->last_distance = distance; | ||
2749 | up = (n->status == PEER_STATE_KEY_CONFIRMED); | 2749 | up = (n->status == PEER_STATE_KEY_CONFIRMED); |
2750 | type = ntohs (message->type); | 2750 | type = ntohs (message->type); |
2751 | size = ntohs (message->size); | 2751 | size = ntohs (message->size); |
@@ -2936,6 +2936,7 @@ handle_transport_notify_connect (void *cls, | |||
2936 | neighbour_count++; | 2936 | neighbour_count++; |
2937 | n->peer = *peer; | 2937 | n->peer = *peer; |
2938 | n->last_latency = latency; | 2938 | n->last_latency = latency; |
2939 | n->last_distance = distance; | ||
2939 | GNUNET_CRYPTO_aes_create_session_key (&n->encrypt_key); | 2940 | GNUNET_CRYPTO_aes_create_session_key (&n->encrypt_key); |
2940 | n->encrypt_key_created = now; | 2941 | n->encrypt_key_created = now; |
2941 | n->set_key_retry_frequency = INITIAL_SET_KEY_RETRY_FREQUENCY; | 2942 | n->set_key_retry_frequency = INITIAL_SET_KEY_RETRY_FREQUENCY; |