mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Avoid generating extra spaces when explaining how we guessed our address
This commit is contained in:
parent
92ea0b86de
commit
36e2eb6775
@ -2073,18 +2073,18 @@ resolve_my_address(int warn_severity, const or_options_t *options,
|
|||||||
* at least until dynamic IP address support becomes bulletproof. */
|
* at least until dynamic IP address support becomes bulletproof. */
|
||||||
log_notice(LD_NET,
|
log_notice(LD_NET,
|
||||||
"Your IP address seems to have changed to %s "
|
"Your IP address seems to have changed to %s "
|
||||||
"(METHOD=%s %s%s). Updating.",
|
"(METHOD=%s%s%s). Updating.",
|
||||||
addr_string, method_used,
|
addr_string, method_used,
|
||||||
hostname_used ? "HOSTNAME=" : "",
|
hostname_used ? " HOSTNAME=" : "",
|
||||||
hostname_used ? hostname_used : "");
|
hostname_used ? hostname_used : "");
|
||||||
ip_address_changed(0);
|
ip_address_changed(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (last_resolved_addr != *addr_out) {
|
if (last_resolved_addr != *addr_out) {
|
||||||
control_event_server_status(LOG_NOTICE,
|
control_event_server_status(LOG_NOTICE,
|
||||||
"EXTERNAL_ADDRESS ADDRESS=%s METHOD=%s %s%s",
|
"EXTERNAL_ADDRESS ADDRESS=%s METHOD=%s%s%s",
|
||||||
addr_string, method_used,
|
addr_string, method_used,
|
||||||
hostname_used ? "HOSTNAME=" : "",
|
hostname_used ? " HOSTNAME=" : "",
|
||||||
hostname_used ? hostname_used : "");
|
hostname_used ? hostname_used : "");
|
||||||
}
|
}
|
||||||
last_resolved_addr = *addr_out;
|
last_resolved_addr = *addr_out;
|
||||||
|
@ -2111,8 +2111,8 @@ check_descriptor_ipaddress_changed(time_t now)
|
|||||||
tor_addr_from_ipv4h(&tmp_prev, prev);
|
tor_addr_from_ipv4h(&tmp_prev, prev);
|
||||||
tor_addr_from_ipv4h(&tmp_cur, cur);
|
tor_addr_from_ipv4h(&tmp_cur, cur);
|
||||||
|
|
||||||
tor_asprintf(&source, "METHOD=%s %s%s", method,
|
tor_asprintf(&source, "METHOD=%s%s%s", method,
|
||||||
hostname ? "HOSTNAME=" : "",
|
hostname ? " HOSTNAME=" : "",
|
||||||
hostname ? hostname : "");
|
hostname ? hostname : "");
|
||||||
|
|
||||||
log_addr_has_changed(LOG_NOTICE, &tmp_prev, &tmp_cur, source);
|
log_addr_has_changed(LOG_NOTICE, &tmp_prev, &tmp_cur, source);
|
||||||
|
Loading…
Reference in New Issue
Block a user