Merge remote-tracking branch 'teor/comments-20151204'

This commit is contained in:
Nick Mathewson 2015-12-07 10:13:20 -05:00
commit f727ebcba8
3 changed files with 8 additions and 5 deletions

View File

@ -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,

View File

@ -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 *

View File

@ -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;