Explorar o código

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.
Nick Mathewson %!s(int64=14) %!d(string=hai) anos
pai
achega
333df6006d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/or/config.c

+ 1 - 1
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;