diff options
Diffstat (limited to 'src/session-initialize-bincimap-up.cc')
-rw-r--r-- | src/session-initialize-bincimap-up.cc | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/src/session-initialize-bincimap-up.cc b/src/session-initialize-bincimap-up.cc index 12c099c..c18ef26 100644 --- a/src/session-initialize-bincimap-up.cc +++ b/src/session-initialize-bincimap-up.cc @@ -1,9 +1,10 @@ -/** -------------------------------------------------------------------- +/** * @file session-initialize-bincimap-up.cc * @brief bincimap-up requires sslserver * @author Andreas Aardal Hanssen, Erwin Hoffmann * @date 2002-2005, 2023 - * ----------------------------------------------------------------- **/ + */ + #include "broker.h" #include "convert.h" #include "globals.h" @@ -23,12 +24,11 @@ #include <fcntl.h> #include <syslog.h> -using namespace ::std; using namespace Binc; +using std::string; extern char **environ; -//---------------------------------------------------------------------- bool Session::initialize(int argc, char *argv[]) { IOFactory &ioFactory = IOFactory::getInstance(); @@ -76,30 +76,28 @@ bool Session::initialize(int argc, char *argv[]) const string f = session.getEnv("SYSLOG_FACILITY"); int facility; - if (isdigit(f[0])) { + if (isdigit(f[0])) facility = atoi(f); - } else { - if (f == "LOG_USER") - facility = LOG_USER; - else if (f == "LOG_LOCAL0") - facility = LOG_LOCAL0; - else if (f == "LOG_LOCAL1") - facility = LOG_LOCAL1; - else if (f == "LOG_LOCAL2") - facility = LOG_LOCAL2; - else if (f == "LOG_LOCAL3") - facility = LOG_LOCAL3; - else if (f == "LOG_LOCAL4") - facility = LOG_LOCAL4; - else if (f == "LOG_LOCAL5") - facility = LOG_LOCAL5; - else if (f == "LOG_LOCAL6") - facility = LOG_LOCAL6; - else if (f == "LOG_LOCAL7") - facility = LOG_LOCAL7; - else - facility = LOG_DAEMON; - } + else if (f == "LOG_USER") + facility = LOG_USER; + else if (f == "LOG_LOCAL0") + facility = LOG_LOCAL0; + else if (f == "LOG_LOCAL1") + facility = LOG_LOCAL1; + else if (f == "LOG_LOCAL2") + facility = LOG_LOCAL2; + else if (f == "LOG_LOCAL3") + facility = LOG_LOCAL3; + else if (f == "LOG_LOCAL4") + facility = LOG_LOCAL4; + else if (f == "LOG_LOCAL5") + facility = LOG_LOCAL5; + else if (f == "LOG_LOCAL6") + facility = LOG_LOCAL6; + else if (f == "LOG_LOCAL7") + facility = LOG_LOCAL7; + else + facility = LOG_DAEMON; SyslogDevice *device = new SyslogDevice(IODevice::IsEnabled | IODevice::FlushesOnEndl, "bincimap-up", @@ -112,7 +110,6 @@ bool Session::initialize(int argc, char *argv[]) IOFactory::getLogger().setFlags(IODevice::FlushesOnEndl); IOFactory::getLogger().setOutputLevelLimit(IODevice::InfoLevel); - // imaps (port 993) -- requires sslserver with option -e int stls = 0; |