mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
wireaddr: pass an array to wireaddr_from_hostname
'wireaddr_from_hostname' now expects a tal array.
This commit is contained in:
parent
ece0ec8bb9
commit
fad133ed2e
1 changed files with 6 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue