summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-07-23 21:11:33 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-07-23 21:11:33 +0200
commitb82c6ed0cbbb4f3535be050652594d1ee1bfcf7a (patch)
treee7417a1ab53cc1754e48cabf8999271ecaae730d /src
parentce4645aef8b57f5ac8f1697d6396ce4761aed843 (diff)
downloadfastd-b82c6ed0cbbb4f3535be050652594d1ee1bfcf7a.tar
fastd-b82c6ed0cbbb4f3535be050652594d1ee1bfcf7a.zip
Use schedule_handshake in handle_resolv_returns
Diffstat (limited to 'src')
-rw-r--r--src/fastd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fastd.c b/src/fastd.c
index e35584a..6eea3f0 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -788,13 +788,13 @@ static inline void update_time(fastd_context_t *ctx) {
clock_gettime(CLOCK_MONOTONIC, &ctx->now);
}
-static inline void schedule_new_handshake(fastd_context_t *ctx, fastd_peer_t *peer) {
+static inline void schedule_handshake(fastd_context_t *ctx, fastd_peer_t *peer) {
fastd_task_schedule_handshake(ctx, peer, fastd_rand(ctx, 17500, 22500));
}
static void send_handshake(fastd_context_t *ctx, fastd_peer_t *peer) {
if (!fastd_peer_may_connect(ctx, peer)) {
- schedule_new_handshake(ctx, peer);
+ schedule_handshake(ctx, peer);
return;
}
@@ -814,7 +814,7 @@ static void send_handshake(fastd_context_t *ctx, fastd_peer_t *peer) {
}
}
- schedule_new_handshake(ctx, peer);
+ schedule_handshake(ctx, peer);
}
static void handle_tasks(fastd_context_t *ctx) {
@@ -826,7 +826,7 @@ static void handle_tasks(fastd_context_t *ctx) {
if (fastd_peer_may_connect(ctx, task->peer))
fastd_resolve_peer(ctx, task->peer);
else
- schedule_new_handshake(ctx, task->peer);
+ schedule_handshake(ctx, task->peer);
}
else {
send_handshake(ctx, task->peer);
@@ -1079,7 +1079,7 @@ static void handle_resolv_returns(fastd_context_t *ctx) {
}
else {
pr_warn(ctx, "hostname `%s' resolved to address %I which is used by a fixed peer", hostname, &resolve_return.addr);
- fastd_task_schedule_handshake(ctx, peer, fastd_rand(ctx, 17500, 22500));
+ schedule_handshake(ctx, peer);
}
break;
}