summaryrefslogtreecommitdiffstats
path: root/src/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve.c')
-rw-r--r--src/resolve.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/resolve.c b/src/resolve.c
index 9631c48..8dcdb2d 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -34,6 +34,7 @@
typedef struct resolv_arg {
fastd_context_t *ctx;
fastd_remote_t *remote;
+ struct timespec resolve_time;
char *hostname;
fastd_peer_address_t constraints;
} resolv_arg_t;
@@ -71,7 +72,8 @@ static void* resolve_peer(void *varg) {
}
fastd_resolve_return_t ret = {
- .remote = arg->remote
+ .remote = arg->remote,
+ .resolve_time = arg->resolve_time,
};
if (!error) {
@@ -113,6 +115,7 @@ void fastd_resolve_peer(fastd_context_t *ctx, fastd_peer_t *peer, fastd_remote_t
arg->ctx = ctx;
arg->remote = remote;
+ arg->resolve_time = ctx->now;
arg->hostname = strdup(remote->config->hostname);
arg->constraints = remote->config->address;