summaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-10-05 02:06:36 +0000
committerNick Mathewson <nickm@torproject.org>2005-10-05 02:06:36 +0000
commit843459558438d381c9040cba0216e7fa877ecbe1 (patch)
tree0fc71127f05c5db2e08e844b592bfc45bc1995e2 /src/or/rendservice.c
parent0924094042382892ca6ada9977b6e4696222c24c (diff)
downloadtor-843459558438d381c9040cba0216e7fa877ecbe1.tar.gz
tor-843459558438d381c9040cba0216e7fa877ecbe1.zip
Fix verbose compiler warnings, including one in routerlist.c that would have been an actual error. Normalize whitespace. Enforce convention that "address" is a hostname and "addr" is an IPv4 address.
svn:r5190
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index b33776bf8c..ff94db3ee1 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -18,7 +18,7 @@ static circuit_t *find_intro_circuit(routerinfo_t *router, const char *pk_digest
typedef struct rend_service_port_config_t {
uint16_t virtual_port;
uint16_t real_port;
- uint32_t real_address;
+ uint32_t real_addr;
} rend_service_port_config_t;
/** Try to maintain this many intro points per service if possible. */
@@ -128,7 +128,7 @@ add_service(rend_service_t *service)
for (i = 0; i < smartlist_len(service->ports); ++i) {
char addrbuf[INET_NTOA_BUF_LEN];
p = smartlist_get(service->ports, i);
- addr.s_addr = htonl(p->real_address);
+ addr.s_addr = htonl(p->real_addr);
tor_inet_ntoa(&addr, addrbuf, sizeof(addrbuf));
log_fn(LOG_DEBUG,"Service maps port %d to %s:%d",
p->virtual_port, addrbuf, p->real_port);
@@ -191,7 +191,7 @@ parse_port_config(const char *string)
result = tor_malloc(sizeof(rend_service_port_config_t));
result->virtual_port = virtport;
result->real_port = realport;
- result->real_address = addr;
+ result->real_addr = addr;
err:
SMARTLIST_FOREACH(sl, char *, c, tor_free(c));
smartlist_free(sl);
@@ -1094,7 +1094,7 @@ rend_service_set_connection_addr_port(connection_t *conn, circuit_t *circ)
for (i = 0; i < smartlist_len(service->ports); ++i) {
p = smartlist_get(service->ports, i);
if (conn->port == p->virtual_port) {
- conn->addr = p->real_address;
+ conn->addr = p->real_addr;
conn->port = p->real_port;
return 0;
}