summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-02-26 23:07:41 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-02-26 23:07:41 +0100
commit0b2285d57012111b16eca820fef59c46662b59b3 (patch)
treead41894dff25f040acbc80dde6facf4e1b381cb5 /src/peer.c
parent4ab4858d5473c816cc526b296ae9da6c6956219d (diff)
downloadfastd-0b2285d57012111b16eca820fef59c46662b59b3.tar
fastd-0b2285d57012111b16eca820fef59c46662b59b3.zip
Don't reset "seen" timestamp on peer reset
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/peer.c b/src/peer.c
index 7921b7e..88b61ef 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -160,7 +160,6 @@ static void setup_peer(fastd_context_t *ctx, fastd_peer_t *peer) {
peer->last_resolve = (struct timespec){0, 0};
peer->last_resolve_return = (struct timespec){0, 0};
- peer->seen = (struct timespec){0, 0};
peer->last_handshake = (struct timespec){0, 0};
peer->last_handshake_address.sa.sa_family = AF_UNSPEC;
@@ -402,6 +401,7 @@ fastd_peer_t* fastd_peer_add(fastd_context_t *ctx, fastd_peer_config_t *peer_con
peer->protocol_config = peer_conf->protocol_config;
peer->protocol_state = NULL;
peer->sock = NULL;
+ peer->seen = (struct timespec){0, 0};
setup_peer(ctx, peer);
pr_verbose(ctx, "adding peer %P (group `%s')", peer, peer->group->conf->name);
@@ -423,6 +423,7 @@ fastd_peer_t* fastd_peer_add_temporary(fastd_context_t *ctx, fastd_socket_t *soc
peer->group = ctx->peer_group;
peer->protocol_state = NULL;
peer->sock = sock;
+ peer->seen = ctx->now;
setup_peer(ctx, peer);
peer->address = *addr;