From fad133ed2eb5db947d546a916df5c89afeb2e9b1 Mon Sep 17 00:00:00 2001 From: darosior Date: Sat, 14 Sep 2019 00:23:24 +0200 Subject: [PATCH] wireaddr: pass an array to wireaddr_from_hostname 'wireaddr_from_hostname' now expects a tal array. --- common/wireaddr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/wireaddr.c b/common/wireaddr.c index 5e87f3b5f..9a0643c66 100644 --- a/common/wireaddr.c +++ b/common/wireaddr.c @@ -405,8 +405,12 @@ bool parse_wireaddr(const char *arg, struct wireaddr *addr, u16 defport, } /* Resolve with getaddrinfo */ - if (!res) - res = wireaddr_from_hostname(&addr, ip, port, no_dns, NULL, err_msg); + if (!res) { + struct wireaddr *addresses = tal_arr(NULL, struct wireaddr, 0); + res = wireaddr_from_hostname(&addresses, ip, port, no_dns, NULL, err_msg); + *addr = addresses[0]; + tal_free(addresses); + } finish: if (!res && err_msg && !*err_msg)