[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Rename get_primary_dir_port()



commit 39146383fc30ee7cce61e3d5d753ae8605dddc22
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Jul 21 12:16:53 2020 -0400

    Rename get_primary_dir_port()
    
    Also, remove get_primary_or_port() -- nothing used it.
---
 src/app/config/config.h    | 6 ++----
 src/feature/relay/router.c | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/app/config/config.h b/src/app/config/config.h
index fdffd66683..ee39490072 100644
--- a/src/app/config/config.h
+++ b/src/app/config/config.h
@@ -160,10 +160,8 @@ MOCK_DECL(const smartlist_t *,get_configured_ports,(void));
 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() \
+                                       int address_family);
+#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);
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 18d815097f..1ad5cbf5da 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -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)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits