aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-30 16:53:31 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-30 17:00:22 -0400
commitd7e4777791bbaa93f82b98c2529450794b9e8a3f (patch)
tree80af982bb2c6a1a5ea8382e812efd0dade92a0ec /src
parent074bf72a2cb9e641468b9ef92a8b16c7f0e2f00a (diff)
downloadtor-d7e4777791bbaa93f82b98c2529450794b9e8a3f.tar
tor-d7e4777791bbaa93f82b98c2529450794b9e8a3f.tar.gz
Add a little documentation for the bug5604 fix
Diffstat (limited to 'src')
-rw-r--r--src/or/connection.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 642ee6e95..242276538 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1807,18 +1807,21 @@ connection_read_proxy_handshake(connection_t *conn)
* entry in <b>ports</b>. Add to <b>new_conns</b> new every connection we
* launch.
*
+ * If <b>control_listeners_only</b> is true, then we only open control
+ * listeners, and we do not remove any noncontrol listeners from old_conns.
+ *
* Return 0 on success, -1 on failure.
**/
static int
retry_listener_ports(smartlist_t *old_conns,
const smartlist_t *ports,
smartlist_t *new_conns,
- int close_all_noncontrol)
+ int control_listeners_only)
{
smartlist_t *launch = smartlist_new();
int r = 0;
- if (close_all_noncontrol) {
+ if (control_listeners_only) {
SMARTLIST_FOREACH(ports, port_cfg_t *, p, {
if (p->type == CONN_TYPE_CONTROL_LISTENER)
smartlist_add(launch, p);
@@ -1925,6 +1928,9 @@ retry_listener_ports(smartlist_t *old_conns,
*
* Add all old conns that should be closed to <b>replaced_conns</b>.
* Add all new connections to <b>new_conns</b>.
+ *
+ * If <b>close_all_noncontrol</b> is true, then we only open control
+ * listeners, and we close all other listeners.
*/
int
retry_all_listeners(smartlist_t *replaced_conns,