diff options
author | Roger Dingledine <arma@torproject.org> | 2010-03-05 16:04:01 -0500 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2010-03-05 16:04:01 -0500 |
commit | 625963d92a3457470cd5097051fddd00a6b5e04c (patch) | |
tree | 048870c8caec5bd8380aedfd0a651d5733faf586 /src | |
parent | 368ca2a646610132e02ea7608122286841e2dc7e (diff) | |
download | tor-625963d92a3457470cd5097051fddd00a6b5e04c.tar.gz tor-625963d92a3457470cd5097051fddd00a6b5e04c.zip |
commit my annotations while i was hunting down the host order bug
Diffstat (limited to 'src')
-rw-r--r-- | src/common/address.c | 2 | ||||
-rw-r--r-- | src/or/config.c | 8 | ||||
-rw-r--r-- | src/or/connection.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/common/address.c b/src/common/address.c index e51b7d8125..4569373f3b 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -726,7 +726,7 @@ tor_addr_is_loopback(const tor_addr_t *addr) } /** Set <b>dest</b> to equal the IPv4 address in <b>v4addr</b> (given in - * network order. */ + * network order). */ void tor_addr_from_ipv4n(tor_addr_t *dest, uint32_t v4addr) { diff --git a/src/or/config.c b/src/or/config.c index 6292f8f17d..cbf9a5a0c6 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -2191,7 +2191,7 @@ resolve_my_address(int warn_severity, or_options_t *options, uint32_t *addr_out, char **hostname_out) { struct in_addr in; - uint32_t addr; + uint32_t addr; /* host order */ char hostname[256]; int explicit_ip=1; int explicit_hostname=1; @@ -2221,8 +2221,8 @@ resolve_my_address(int warn_severity, or_options_t *options, if (tor_inet_aton(hostname, &in) == 0) { /* then we have to resolve it */ explicit_ip = 0; - if (tor_lookup_hostname(hostname, &addr)) { - uint32_t interface_ip; + if (tor_lookup_hostname(hostname, &addr)) { /* failed to resolve */ + uint32_t interface_ip; /* host order */ if (explicit_hostname) { log_fn(warn_severity, LD_CONFIG, @@ -2243,7 +2243,7 @@ resolve_my_address(int warn_severity, or_options_t *options, log_fn(notice_severity, LD_CONFIG, "Learned IP address '%s' for " "local interface. Using that.", tmpbuf); strlcpy(hostname, "<guessed from interfaces>", sizeof(hostname)); - } else { + } else { /* resolved hostname into addr */ in.s_addr = htonl(addr); if (!explicit_hostname && diff --git a/src/or/connection.c b/src/or/connection.c index 3747f2edf3..7b1493bfc5 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -3095,10 +3095,10 @@ alloc_http_authenticator(const char *authenticator) static void client_check_address_changed(int sock) { - uint32_t iface_ip, ip_out; + uint32_t iface_ip, ip_out; /* host order */ struct sockaddr_in out_addr; socklen_t out_addr_len = (socklen_t) sizeof(out_addr); - uint32_t *ip; + uint32_t *ip; /* host order */ if (!last_interface_ip) get_interface_address(LOG_INFO, &last_interface_ip); |