diff options
author | David Fifield <david@bamsoftware.com> | 2012-10-06 21:25:25 -0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-10-10 22:25:30 -0400 |
commit | 8419d184411e8cd9457346a7a3d5f9734211a8b2 (patch) | |
tree | d97f5e28e33089a948ca958253bdd86aa9b3ab13 /src/or/config.c | |
parent | 78e2d8c7a85c8ec2defe5d1873ae19ba9b82b14c (diff) | |
download | tor-8419d184411e8cd9457346a7a3d5f9734211a8b2.tar.gz tor-8419d184411e8cd9457346a7a3d5f9734211a8b2.zip |
Use fmt_addrport where appropriate.
This is mostly a conversion from this pattern:
log("... %s:%d ...", fmt_and_decorate_addr(&addr), port);
to this:
log("... %s ...", fmt_addrport(&addr, port));
The output is the same in all cases.
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/or/config.c b/src/or/config.c index dc43decf88..1233f5b8ad 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3945,8 +3945,8 @@ parse_bridge_line(const char *line, int validate_only) } if (!validate_only) { - log_debug(LD_DIR, "Bridge at %s:%d (transport: %s) (%s)", - fmt_and_decorate_addr(&addr), (int)port, + log_debug(LD_DIR, "Bridge at %s (transport: %s) (%s)", + fmt_addrport(&addr, port), transport_name ? transport_name : "no transport", fingerprint ? fingerprint : "no key listed"); bridge_add_from_config(&addr, port, @@ -4079,8 +4079,8 @@ parse_client_transport_line(const char *line, int validate_only) transport_add_from_config(&addr, port, smartlist_get(transport_list, 0), socks_ver); - log_info(LD_DIR, "Transport '%s' found at %s:%d", - transports, fmt_and_decorate_addr(&addr), (int)port); + log_info(LD_DIR, "Transport '%s' found at %s", + transports, fmt_addrport(&addr, port)); } } @@ -4199,8 +4199,8 @@ parse_server_transport_line(const char *line, int validate_only) } if (!validate_only) { - log_info(LD_DIR, "Server transport '%s' at %s:%d.", - transports, fmt_and_decorate_addr(&addr), (int)port); + log_info(LD_DIR, "Server transport '%s' at %s.", + transports, fmt_addrport(&addr, port)); } } @@ -4372,17 +4372,17 @@ warn_nonlocal_client_ports(const smartlist_t *ports, const char *portname) if (port->is_unix_addr) { /* Unix sockets aren't accessible over a network. */ } else if (!tor_addr_is_internal(&port->addr, 1)) { - log_warn(LD_CONFIG, "You specified a public address '%s:%d' for %sPort. " + log_warn(LD_CONFIG, "You specified a public address '%s' for %sPort. " "Other people on the Internet might find your computer and " "use it as an open proxy. Please don't allow this unless you " "have a good reason.", - fmt_and_decorate_addr(&port->addr), port->port, portname); + fmt_addrport(&port->addr, port->port), portname); } else if (!tor_addr_is_loopback(&port->addr)) { - log_notice(LD_CONFIG, "You configured a non-loopback address '%s:%d' " + log_notice(LD_CONFIG, "You configured a non-loopback address '%s' " "for %sPort. This allows everybody on your local network to " "use your machine as a proxy. Make sure this is what you " "wanted.", - fmt_and_decorate_addr(&port->addr), port->port, portname); + fmt_addrport(&port->addr, port->port), portname); } } SMARTLIST_FOREACH_END(port); } |