Use stunnel-provided combined addr

This commit is contained in:
Neale Pickett 2015-02-26 16:01:56 -07:00
parent c3ddfae1ff
commit 86a75813e3
1 changed files with 3 additions and 6 deletions

9
eris.c
View File

@ -238,17 +238,14 @@ get_ucspi_env()
} }
} }
if (!ip) {
// stunnel
ip = getenv("REMOTE_HOST");
port = getenv("REMOTE_PORT");
}
if (ip) { if (ip) {
char buf[80]; char buf[80];
snprintf(buf, sizeof buf, "%s:%s", ip, port); snprintf(buf, sizeof buf, "%s:%s", ip, port);
remote_addr = strdup(buf); remote_addr = strdup(buf);
} else {
// stunnel
remote_addr = getenv("REMOTE_ADDR");
} }
} }