summaryrefslogtreecommitdiffstats
path: root/src/async.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-18 22:01:38 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-18 22:01:38 +0200
commit5d111c83ff2fb9fb1e094ccfdfa919a4731ec05b (patch)
tree277a0d2b69cc2ba69cbeff2e6f4fbb4eb39080f0 /src/async.c
parent2352e1a79e6f77cb894f5b65b1632e27cd0695a9 (diff)
downloadfastd-5d111c83ff2fb9fb1e094ccfdfa919a4731ec05b.tar
fastd-5d111c83ff2fb9fb1e094ccfdfa919a4731ec05b.zip
peer: add a flag `dynamic' instead of checking the config field for NULL
Diffstat (limited to 'src/async.c')
-rw-r--r--src/async.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/async.c b/src/async.c
index 7ab78ce..4348194 100644
--- a/src/async.c
+++ b/src/async.c
@@ -66,7 +66,7 @@ static void handle_resolve_return(const fastd_async_resolve_return_t *resolve_re
if (!peer)
return;
- if (!peer->config)
+ if (fastd_peer_is_dynamic(peer))
exit_bug("resolve return for dynamic peer");
fastd_remote_t *remote = &VECTOR_INDEX(peer->remotes, resolve_return->remote);
@@ -81,7 +81,7 @@ static void handle_verify_return(const fastd_async_verify_return_t *verify_retur
if (!peer)
return;
- if (peer->config)
+ if (!fastd_peer_is_dynamic(peer))
exit_bug("verify return for permanent peer");
fastd_peer_set_verified(peer, verify_return->ok);