diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-05-11 11:52:51 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-05-11 11:52:51 -0400 |
commit | e0655708a20069a5f42476a25d62e9d3f8138d8c (patch) | |
tree | 4ee26e5176efe7f61c4fba89bc21886b7508df27 /src/or/transports.c | |
parent | 84ddc4b6aad392dd9a735580caf6fb68e3694d42 (diff) | |
parent | 6d2898607bd831944c6c15b6e15200a426149811 (diff) | |
download | tor-e0655708a20069a5f42476a25d62e9d3f8138d8c.tar.gz tor-e0655708a20069a5f42476a25d62e9d3f8138d8c.zip |
Merge remote-tracking branch 'asn/bug4865_take2'
Diffstat (limited to 'src/or/transports.c')
-rw-r--r-- | src/or/transports.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/transports.c b/src/or/transports.c index 07b9371158..0082b6a9e4 100644 --- a/src/or/transports.c +++ b/src/or/transports.c @@ -964,8 +964,6 @@ get_bindaddr_for_server_proxy(const managed_proxy_t *mp) static process_environment_t * create_managed_proxy_environment(const managed_proxy_t *mp) { - const or_options_t *options = get_options(); - /* Environment variables to be added to or set in mp's environment. */ smartlist_t *envs = smartlist_new(); /* XXXX The next time someone touches this code, shorten the name of @@ -1000,8 +998,11 @@ create_managed_proxy_environment(const managed_proxy_t *mp) } if (mp->is_server) { - smartlist_add_asprintf(envs, "TOR_PT_ORPORT=127.0.0.1:%s", - options->ORPort->value); + { + char *orport_tmp = get_first_listener_addrport_string(CONN_TYPE_OR_LISTENER); + smartlist_add_asprintf(envs, "TOR_PT_ORPORT=%s", orport_tmp); + tor_free(orport_tmp); + } { char *bindaddr_tmp = get_bindaddr_for_server_proxy(mp); |