From 86a75813e3f54e811aee7b8b06581c5d8d31e271 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Thu, 26 Feb 2015 16:01:56 -0700 Subject: [PATCH] Use stunnel-provided combined addr --- eris.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/eris.c b/eris.c index f669433..a33cd68 100644 --- a/eris.c +++ b/eris.c @@ -238,17 +238,14 @@ get_ucspi_env() } } - if (!ip) { - // stunnel - ip = getenv("REMOTE_HOST"); - port = getenv("REMOTE_PORT"); - } - if (ip) { char buf[80]; snprintf(buf, sizeof buf, "%s:%s", ip, port); remote_addr = strdup(buf); + } else { + // stunnel + remote_addr = getenv("REMOTE_ADDR"); } }