summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-30 02:26:30 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-30 02:26:30 +0200
commitca127fccb899627e9e9a69d139bd27d79b30cd54 (patch)
treed6aba2530629cf805fc279dcb2702a3f66cdd177 /src/peer.c
parent4d696a973af61e716959801c88b3ddbeca582e89 (diff)
downloadfastd-ca127fccb899627e9e9a69d139bd27d79b30cd54.tar
fastd-ca127fccb899627e9e9a69d139bd27d79b30cd54.zip
Rework handshake... again. ecfxp protocol broken, will be fixed with next commit.
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/peer.c b/src/peer.c
index 8fbc598..ea53e95 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -59,7 +59,7 @@ static inline void setup_peer(fastd_context *ctx, fastd_peer *peer) {
peer->seen = (struct timespec){0, 0};
if (!fastd_peer_is_floating(peer))
- fastd_task_schedule_handshake(ctx, peer, 0, false);
+ fastd_task_schedule_handshake(ctx, peer, 0);
}
static void delete_peer(fastd_context *ctx, fastd_peer *peer) {
@@ -148,13 +148,13 @@ fastd_peer* fastd_peer_add_temp(fastd_context *ctx, const fastd_peer_address *ad
return peer;
}
-fastd_peer* fastd_peer_merge(fastd_context *ctx, fastd_peer *perm_peer, fastd_peer *temp_peer) {
+fastd_peer* fastd_peer_set_established_merge(fastd_context *ctx, fastd_peer *perm_peer, fastd_peer *temp_peer) {
pr_debug(ctx, "merging peer %P into %P", temp_peer, perm_peer);
ctx->conf->protocol->free_peer_state(ctx, perm_peer);
perm_peer->address = temp_peer->address;
- perm_peer->state = fastd_peer_is_established(temp_peer) ? STATE_ESTABLISHED : STATE_WAIT;
+ perm_peer->state = STATE_ESTABLISHED;
perm_peer->seen = temp_peer->seen;
perm_peer->protocol_state = temp_peer->protocol_state;