[tor-commits] [tor/master] Make FooPort 0 correctly disable the FooPort.

nickm at torproject.org nickm at torproject.org
Tue Aug 9 19:43:13 UTC 2011


commit 333df6006d27fb7e11b504257e3ee22f97c5f04b
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Aug 9 14:52:22 2011 -0400

    Make FooPort 0 correctly disable the FooPort.
    
    Since the prop171 stuff, it had instead made Tor bind port 0, and
    re-bind it differently all the time.
    
    Resolves bug3704; not in any released version.
---
 src/or/config.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index ddce958..1f574c8 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -5118,7 +5118,7 @@ parse_client_port_config(smartlist_t *out,
       }
     } SMARTLIST_FOREACH_END(elt);
 
-    if (out) {
+    if (out && port) {
       port_cfg_t *cfg = tor_malloc_zero(sizeof(port_cfg_t));
       cfg->type = listener_type;
       cfg->port = port;



More information about the tor-commits mailing list