[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] log: Don't use twice fmt_addr() in same logging statement
commit 6de860497e8519d7d327f270ec9ec343b83bf75b
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date: Wed Jul 22 11:09:21 2020 -0400
log: Don't use twice fmt_addr() in same logging statement
Fixes #40059
Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
src/feature/dirclient/dirclient.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/feature/dirclient/dirclient.c b/src/feature/dirclient/dirclient.c
index 7a026d3c52..337fa4c965 100644
--- a/src/feature/dirclient/dirclient.c
+++ b/src/feature/dirclient/dirclient.c
@@ -686,12 +686,14 @@ directory_choose_address_routerstatus(const routerstatus_t *status,
* connect to it. */
if (!have_or && !have_dir) {
static int logged_backtrace = 0;
+ char *ipv6_str = tor_addr_to_str_dup(&status->ipv6_addr);
log_info(LD_BUG, "Rejected all OR and Dir addresses from %s when "
"launching an outgoing directory connection to: IPv4 %s OR %d "
"Dir %d IPv6 %s OR %d Dir %d", routerstatus_describe(status),
fmt_addr(&status->ipv4_addr), status->ipv4_orport,
- status->ipv4_dirport, fmt_addr(&status->ipv6_addr),
- status->ipv6_orport, status->ipv4_dirport);
+ status->ipv4_dirport, ipv6_str, status->ipv6_orport,
+ status->ipv4_dirport);
+ tor_free(ipv6_str);
if (!logged_backtrace) {
log_backtrace(LOG_INFO, LD_BUG, "Addresses came from");
logged_backtrace = 1;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits