daemon/dns: hand netaddr we connected to through to callback.

That way it doesn't have to extract it from fd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-05-22 20:56:50 +09:30
parent f6495d3310
commit 0c8b24cf97
6 changed files with 23 additions and 11 deletions

View File

@@ -14,7 +14,8 @@ struct netaddr;
typesafe_cb_preargs(struct io_plan *, void *, \
(initfn), (arg), \
struct io_conn *, \
struct lightningd_state *), \
struct lightningd_state *, \
const struct netaddr *), \
typesafe_cb_preargs(void, void *, (failfn), (arg), \
struct lightningd_state *), \
(arg))
@@ -23,6 +24,7 @@ struct dns_async *dns_resolve_and_connect_(struct lightningd_state *dstate,
const char *name, const char *port,
struct io_plan *(*init)(struct io_conn *,
struct lightningd_state *,
const struct netaddr *,
void *arg),
void (*fail)(struct lightningd_state *, void *arg),
void *arg);