diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-04-20 17:30:55 +1000 |
---|---|---|
committer | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-04-28 12:26:38 +1000 |
commit | 692828bea558295b2480eab473f9131e85d1eb9e (patch) | |
tree | ba737cfb0ae7f7743b2cef0aa90f56c2b1e1c6c2 /src/or/config.c | |
parent | 7babf33239eb1e349826753a9d0405cb59150cce (diff) | |
download | tor-692828bea558295b2480eab473f9131e85d1eb9e.tar.gz tor-692828bea558295b2480eab473f9131e85d1eb9e.zip |
Decide to advertise begindir support like we decide to advertise DirPort
Decide to advertise begindir support in a similar way to how
we decide to advertise DirPort.
Fix up the associated descriptor-building unit tests.
Resolves #18616, bugfix on 0c8e042c30946faa in #12538 in 0.2.8.1-alpha.
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c index 5d938d101a..f07ca649f8 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -7005,9 +7005,8 @@ get_first_listener_addrport_string(int listener_type) int get_first_advertised_port_by_type_af(int listener_type, int address_family) { - if (!configured_ports) - return 0; - SMARTLIST_FOREACH_BEGIN(configured_ports, const port_cfg_t *, cfg) { + const smartlist_t *conf_ports = get_configured_ports(); + SMARTLIST_FOREACH_BEGIN(conf_ports, const port_cfg_t *, cfg) { if (cfg->type == listener_type && !cfg->server_cfg.no_advertise && (tor_addr_family(&cfg->addr) == address_family || |