allow --bind-addr (not announce) to work with tor autoservice

fix issue #2183 as reported by @gabridome

Signed-off-by: Saibato <Saibato.naga@pm.me>
This commit is contained in:
Saibato 2018-12-19 09:01:40 +00:00 committed by Christian Decker
parent 4c9e07eca5
commit c60725ef3e

View File

@ -1060,12 +1060,15 @@ static struct wireaddr_internal *setup_listeners(const tal_t *ctx,
if (!(proposed_listen_announce[i] & ADDR_LISTEN))
continue;
if (!(proposed_listen_announce[i] & ADDR_ANNOUNCE))
continue;
if (proposed_wireaddr[i].itype != ADDR_INTERNAL_AUTOTOR)
continue;
if (!(proposed_listen_announce[i] & ADDR_ANNOUNCE)) {
tor_autoservice(tmpctx,
&proposed_wireaddr[i].u.torservice,
tor_password,
binding);
continue;
};
add_announcable(announcable,
tor_autoservice(tmpctx,
&proposed_wireaddr[i].u.torservice,