diff options
Diffstat (limited to 'src/session-initialize-bincimap-up.cc')
-rw-r--r-- | src/session-initialize-bincimap-up.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/session-initialize-bincimap-up.cc b/src/session-initialize-bincimap-up.cc index c18ef26..a17a171 100644 --- a/src/session-initialize-bincimap-up.cc +++ b/src/session-initialize-bincimap-up.cc @@ -27,8 +27,6 @@ using namespace Binc; using std::string; -extern char **environ; - bool Session::initialize(int argc, char *argv[]) { IOFactory &ioFactory = IOFactory::getInstance(); @@ -61,9 +59,8 @@ bool Session::initialize(int argc, char *argv[]) session.assignCommandLineArgs(); // for log input - string ip = getenv("TCP6REMOTEIP") ? getenv("TCP6REMOTEIP") - : getenv("TCPREMOTEIP") ? getenv("TCPREMOTEIP") - : "?"; + string ip = Tools::getenv("TCP6REMOTEIP") + .value_or(Tools::getenv("TCPREMOTEIP").value_or("?")); session.setIP(ip); string logtype = session.getEnv("LOG_TYPE"); @@ -113,11 +110,11 @@ bool Session::initialize(int argc, char *argv[]) // imaps (port 993) -- requires sslserver with option -e int stls = 0; - if (getenv("SSL_SESSION_ID")) { + if (Tools::getenv("SSL_SESSION_ID")) { session.command.ssl = true; stls = -1; // else we will do starttls - requires new FDs - } else if (getenv("UCSPITLS")) { + } else if (Tools::getenv("UCSPITLS")) { string ucspitls = session.getEnv("UCSPITLS"); if (ucspitls == "+") stls = 1; if (ucspitls == "-") stls = 0; |