[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10487: Fix retry_all_listeners() and retry_listeners() description (tor/trunk/src/or)



Author: weasel
Date: 2007-06-04 12:58:57 -0400 (Mon, 04 Jun 2007)
New Revision: 10487

Modified:
   tor/trunk/src/or/connection.c
Log:
Fix retry_all_listeners() and retry_listeners() description to match code.  We are smarter than comparing lengths of want- and have-listeners.

Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c	2007-06-04 16:54:42 UTC (rev 10486)
+++ tor/trunk/src/or/connection.c	2007-06-04 16:58:57 UTC (rev 10487)
@@ -995,9 +995,9 @@
  * connection binding to each one.  Otherwise, create a single
  * connection binding to the address <b>default_addr</b>.)
  *
- * Only relaunch the listeners of this type if the number of existing
- * connections is not as configured (e.g., because one died), or if the
- * existing connections do not match those configured.
+ * Only launch the listeners of this type that are not already open, and
+ * only close listeners that are no longer wanted.  Existing listeners
+ * that are still configured are not touched.
  *
  * Add all old conns that should be closed to <b>replaced_conns</b>.
  * Add all new connections to <b>new_conns</b>.
@@ -1100,8 +1100,9 @@
   return r;
 }
 
-/** (Re)launch listeners for each port you should have open.  Only relaunch
- * listeners when we have the wrong number of connections for a given type.
+/** Launch listeners for each port you should have open.  Only launch
+ * listeners who are not already open, and only close listeners we no longer
+ * want.
  *
  * Add all old conns that should be closed to <b>replaced_conns</b>.
  * Add all new connections to <b>new_conns</b>.