aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-07 10:13:20 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-07 10:13:20 -0500
commitf727ebcba8f77e2863d78f1d7c0dd34eae3be699 (patch)
tree51f59673b5a187adcdf9e0219f31a29650e373a8
parent0ec6757091434612c4f956b9ccdee6089f408564 (diff)
parent329aa59e432f9f1796315b5f54692bfeff295c47 (diff)
downloadtor-f727ebcba8f77e2863d78f1d7c0dd34eae3be699.tar.gz
tor-f727ebcba8f77e2863d78f1d7c0dd34eae3be699.zip
Merge remote-tracking branch 'teor/comments-20151204'
-rw-r--r--src/or/connection.c8
-rw-r--r--src/or/main.c3
-rw-r--r--src/or/router.c2
3 files changed, 8 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index b31b99c2e7..4e39832709 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1708,10 +1708,13 @@ connection_connect_sockaddr(connection_t *conn,
}
/** Take conn, make a nonblocking socket; try to connect to
- * addr:port (they arrive in *host order*). If fail, return -1 and if
+ * addr:port (port arrives in *host order*). If fail, return -1 and if
* applicable put your best guess about errno into *<b>socket_error</b>.
* Else assign s to conn-\>s: if connected return 1, if EAGAIN return 0.
*
+ * addr:port can be different to conn->addr:conn->port if connecting through
+ * a proxy.
+ *
* address is used to make the logs useful.
*
* On success, add conn to the list of polled connections.
@@ -4212,7 +4215,8 @@ connection_write_to_buf_impl_,(const char *string, size_t len,
}
/** Return a connection with given type, address, port, and purpose;
- * or NULL if no such connection exists. */
+ * or NULL if no such connection exists (or if all such connections are marked
+ * for close). */
connection_t *
connection_get_by_type_addr_port_purpose(int type,
const tor_addr_t *addr, uint16_t port,
diff --git a/src/or/main.c b/src/or/main.c
index 1469fd1da1..3f166c819d 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -500,8 +500,7 @@ connection_in_array(connection_t *conn)
return smartlist_contains(connection_array, conn);
}
-/** Set <b>*array</b> to an array of all connections, and <b>*n</b>
- * to the length of the array. <b>*array</b> and <b>*n</b> must not
+/** Set <b>*array</b> to an array of all connections. <b>*array</b> must not
* be modified.
*/
smartlist_t *
diff --git a/src/or/router.c b/src/or/router.c
index 90203458b2..bed9dc5e43 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1781,9 +1781,9 @@ router_get_my_descriptor(void)
const char *body;
if (!router_get_my_routerinfo())
return NULL;
- /* Make sure this is nul-terminated. */
tor_assert(desc_routerinfo->cache_info.saved_location == SAVED_NOWHERE);
body = signed_descriptor_get_body(&desc_routerinfo->cache_info);
+ /* Make sure this is nul-terminated. */
tor_assert(!body[desc_routerinfo->cache_info.signed_descriptor_len]);
log_debug(LD_GENERAL,"my desc is '%s'", body);
return body;