aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/rendservice.c3
-rw-r--r--src/or/transports.c7
2 files changed, 5 insertions, 5 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index a360d5ce58..177f3bf23c 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -1957,7 +1957,8 @@ intro_point_should_expire_now(rend_intro_point_t *intro,
return 1;
}
- if (digestmap_size(intro->accepted_intro_rsa_parts) >=
+ if (intro->accepted_intro_rsa_parts != NULL &&
+ digestmap_size(intro->accepted_intro_rsa_parts) >=
INTRO_POINT_LIFETIME_INTRODUCTIONS) {
/* This intro point has been used too many times. Expire it now. */
return 1;
diff --git a/src/or/transports.c b/src/or/transports.c
index eaaf1a3bfb..06bc039f67 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);