aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2015-01-07 19:45:59 +0000
committerAndrea Shepard <andrea@torproject.org>2015-01-07 19:45:59 +0000
commit48633c07660216d3b852b609c44fa318d55908f0 (patch)
tree6ec4b88b685a1741019cb2248ef3e7cd2623d437 /src/or/connection.c
parentc6451e4c9f2e36f447b4da7d91403a16dde4d2e7 (diff)
downloadtor-48633c07660216d3b852b609c44fa318d55908f0.tar.gz
tor-48633c07660216d3b852b609c44fa318d55908f0.zip
Rename is_tcp in connection_listener_new(), since AF_UNIX means SOCK_STREAM no longer implies TCP
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index bb2cff338f..c17a414319 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1084,8 +1084,8 @@ connection_listener_new(const struct sockaddr *listensockaddr,
listensockaddr->sa_family == AF_INET6 ||
(listensockaddr->sa_family == AF_UNIX &&
type != CONN_TYPE_CONTROL_LISTENER)) {
- int is_tcp = (type != CONN_TYPE_AP_DNS_LISTENER);
- if (is_tcp)
+ int is_stream = (type != CONN_TYPE_AP_DNS_LISTENER);
+ if (is_stream)
start_reading = 1;
if ( listensockaddr->sa_family == AF_INET ||
@@ -1097,8 +1097,8 @@ connection_listener_new(const struct sockaddr *listensockaddr,
conn_type_to_string(type), fmt_addrport(&addr, usePort));
s = tor_open_socket_nonblocking(tor_addr_family(&addr),
- is_tcp ? SOCK_STREAM : SOCK_DGRAM,
- is_tcp ? IPPROTO_TCP: IPPROTO_UDP);
+ is_stream ? SOCK_STREAM : SOCK_DGRAM,
+ is_stream ? IPPROTO_TCP: IPPROTO_UDP);
if (!SOCKET_OK(s)) {
log_warn(LD_NET, "Socket creation failed: %s",
tor_socket_strerror(tor_socket_errno(-1)));
@@ -1228,7 +1228,7 @@ connection_listener_new(const struct sockaddr *listensockaddr,
goto err;
}
- if (is_tcp) {
+ if (is_stream) {
if (tor_listen(s) < 0) {
log_warn(LD_NET, "Could not listen on %s:%u: %s", address, usePort,
tor_socket_strerror(tor_socket_errno(s)));