summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-03 16:11:23 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-16 09:22:58 -0500
commit13dac5e463e183695e6579fb8bdd4747db50cf6e (patch)
tree198e9c45ae6753d691110dcdb00da75503f72dd1 /src/or/connection.c
parent58d17add5e701f8d9b2d3fbe84f0dfd5c9e23c30 (diff)
downloadtor-13dac5e463e183695e6579fb8bdd4747db50cf6e.tar.gz
tor-13dac5e463e183695e6579fb8bdd4747db50cf6e.zip
Move entry_port_cfg_t fields in entry_connection_t
Also rename some options for uniformity, and apply this script: @@ entry_connection_t *conn; @@ conn-> +entry_cfg. \( isolation_flags \| session_group \| socks_prefer_no_auth \| ipv4_traffic \| ipv6_traffic \| prefer_ipv6 \| cache_ipv4_answers \| cache_ipv6_answers \| use_cached_ipv4_answers \| use_cached_ipv6_answers \| prefer_ipv6_virtaddr \)
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index e387f46cef..41a6d7cb5f 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -305,9 +305,9 @@ entry_connection_new(int type, int socket_family)
* in a little while. Otherwise, we're doing this as a linked connection
* of some kind, and we should set it up here based on the socket family */
if (socket_family == AF_INET)
- entry_conn->ipv4_traffic_ok = 1;
+ entry_conn->entry_cfg.ipv4_traffic = 1;
else if (socket_family == AF_INET6)
- entry_conn->ipv6_traffic_ok = 1;
+ entry_conn->entry_cfg.ipv6_traffic = 1;
return entry_conn;
}
@@ -1483,20 +1483,20 @@ connection_init_accepted_conn(connection_t *conn,
return rv;
break;
case CONN_TYPE_AP:
- TO_ENTRY_CONN(conn)->isolation_flags = listener->entry_cfg.isolation_flags;
- TO_ENTRY_CONN(conn)->session_group = listener->entry_cfg.session_group;
+ TO_ENTRY_CONN(conn)->entry_cfg.isolation_flags = listener->entry_cfg.isolation_flags;
+ TO_ENTRY_CONN(conn)->entry_cfg.session_group = listener->entry_cfg.session_group;
TO_ENTRY_CONN(conn)->nym_epoch = get_signewnym_epoch();
TO_ENTRY_CONN(conn)->socks_request->listener_type = listener->base_.type;
- TO_ENTRY_CONN(conn)->ipv4_traffic_ok = listener->entry_cfg.ipv4_traffic;
- TO_ENTRY_CONN(conn)->ipv6_traffic_ok = listener->entry_cfg.ipv6_traffic;
- TO_ENTRY_CONN(conn)->prefer_ipv6_traffic = listener->entry_cfg.prefer_ipv6;
- TO_ENTRY_CONN(conn)->cache_ipv4_answers = listener->entry_cfg.cache_ipv4_answers;
- TO_ENTRY_CONN(conn)->cache_ipv6_answers = listener->entry_cfg.cache_ipv6_answers;
- TO_ENTRY_CONN(conn)->use_cached_ipv4_answers =
+ TO_ENTRY_CONN(conn)->entry_cfg.ipv4_traffic = listener->entry_cfg.ipv4_traffic;
+ TO_ENTRY_CONN(conn)->entry_cfg.ipv6_traffic = listener->entry_cfg.ipv6_traffic;
+ TO_ENTRY_CONN(conn)->entry_cfg.prefer_ipv6 = listener->entry_cfg.prefer_ipv6;
+ TO_ENTRY_CONN(conn)->entry_cfg.cache_ipv4_answers = listener->entry_cfg.cache_ipv4_answers;
+ TO_ENTRY_CONN(conn)->entry_cfg.cache_ipv6_answers = listener->entry_cfg.cache_ipv6_answers;
+ TO_ENTRY_CONN(conn)->entry_cfg.use_cached_ipv4_answers =
listener->entry_cfg.use_cached_ipv4_answers;
- TO_ENTRY_CONN(conn)->use_cached_ipv6_answers =
+ TO_ENTRY_CONN(conn)->entry_cfg.use_cached_ipv6_answers =
listener->entry_cfg.use_cached_ipv6_answers;
- TO_ENTRY_CONN(conn)->prefer_ipv6_virtaddr =
+ TO_ENTRY_CONN(conn)->entry_cfg.prefer_ipv6_virtaddr =
listener->entry_cfg.prefer_ipv6_virtaddr;
switch (TO_CONN(listener)->type) {