aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 3cc4e09fb..0b03092f7 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -269,8 +269,6 @@ dir_connection_new(int socket_family)
/** Allocate and return a new or_connection_t, initialized as by
* connection_init().
*
- * Set timestamp_last_added_nonpadding to now.
- *
* Initialize active_circuit_pqueue.
*
* Set active_circuit_pqueue_last_recalibrated to current cell_ewma tick.
@@ -283,7 +281,7 @@ or_connection_new(int type, int socket_family)
tor_assert(type == CONN_TYPE_OR || type == CONN_TYPE_EXT_OR);
connection_init(now, TO_CONN(or_conn), type, socket_family);
- or_conn->timestamp_last_added_nonpadding = time(NULL);
+ connection_or_set_canonical(or_conn, 0);
if (type == CONN_TYPE_EXT_OR)
connection_or_set_ext_or_identifier(or_conn);
@@ -1017,7 +1015,7 @@ connection_listener_new(const struct sockaddr *listensockaddr,
tor_socket_t s = TOR_INVALID_SOCKET; /* the socket we're going to make */
or_options_t const *options = get_options();
#if defined(HAVE_PWD_H) && defined(HAVE_SYS_UN_H)
- struct passwd *pw = NULL;
+ const struct passwd *pw = NULL;
#endif
uint16_t usePort = 0, gotPort = 0;
int start_reading = 0;
@@ -1157,7 +1155,7 @@ connection_listener_new(const struct sockaddr *listensockaddr,
}
#ifdef HAVE_PWD_H
if (options->User) {
- pw = getpwnam(options->User);
+ pw = tor_getpwnam(options->User);
if (pw == NULL) {
log_warn(LD_NET,"Unable to chown() %s socket: user %s not found.",
address, options->User);