[tor-commits] [tor/master] Fix warnings.
nickm at torproject.org
nickm at torproject.org
Thu Dec 1 13:19:43 UTC 2011
commit c06c80b7f7911b0d5c99860ef8c4770cacdbe0a2
Author: Linus Nordberg <linus at nordberg.se>
Date: Thu Dec 1 09:40:47 2011 +0100
Fix warnings.
Remove environ declaration.
Use ORPort->value. And it's a string.
Make tmp a char *.
---
src/or/transports.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/or/transports.c b/src/or/transports.c
index eaaf1a3..06bc039 100644
--- a/src/or/transports.c
+++ b/src/or/transports.c
@@ -946,10 +946,8 @@ static void
set_managed_proxy_environment(LPVOID *envp, const managed_proxy_t *mp)
{
const or_options_t *options = get_options();
- extern char **environ;
-
- LPVOID tmp=NULL;
+ char *tmp=NULL;
char *state_tmp=NULL;
char *state_env=NULL;
char *transports_to_launch=NULL;
@@ -992,7 +990,8 @@ set_managed_proxy_environment(LPVOID *envp, const managed_proxy_t *mp)
smartlist_add(envs, transports_env);
if (mp->is_server) {
- tor_asprintf(&orport_env, "TOR_PT_ORPORT=127.0.0.1:%d", options->ORPort);
+ tor_asprintf(&orport_env, "TOR_PT_ORPORT=127.0.0.1:%s",
+ options->ORPort->value);
bindaddr_tmp = get_bindaddr_for_proxy(mp);
tor_asprintf(&bindaddr_env, "TOR_PT_SERVER_BINDADDR=%s", bindaddr_tmp);
More information about the tor-commits
mailing list