Browse Source

wireaddr: pass an array to wireaddr_from_hostname

'wireaddr_from_hostname' now expects a tal array.
travis-debug
darosior 5 years ago
committed by Rusty Russell
parent
commit
fad133ed2e
  1. 8
      common/wireaddr.c

8
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)

Loading…
Cancel
Save