Rename get_primary_dir_port()

Also, remove get_primary_or_port() -- nothing used it.
This commit is contained in:
Nick Mathewson 2020-07-21 12:16:53 -04:00
parent f57c31e4be
commit 39146383fc
2 changed files with 3 additions and 5 deletions

View File

@ -161,9 +161,7 @@ int port_binds_ipv4(const port_cfg_t *port);
int port_binds_ipv6(const port_cfg_t *port);
int portconf_get_first_advertised_port(int listener_type,
int address_family);
#define get_primary_or_port() \
(portconf_get_first_advertised_port(CONN_TYPE_OR_LISTENER, AF_INET))
#define get_primary_dir_port() \
#define portconf_get_primary_dir_port() \
(portconf_get_first_advertised_port(CONN_TYPE_DIR_LISTENER, AF_INET))
const tor_addr_t *portconf_get_first_advertised_addr(int listener_type,
int address_family);

View File

@ -1572,7 +1572,7 @@ router_can_extend_over_ipv6,(const or_options_t *options))
uint16_t
router_get_advertised_dir_port(const or_options_t *options, uint16_t dirport)
{
int dirport_configured = get_primary_dir_port();
int dirport_configured = portconf_get_primary_dir_port();
(void)options;
if (!dirport_configured)