diff options
Diffstat (limited to 'src/session.cc')
-rw-r--r-- | src/session.cc | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/session.cc b/src/session.cc index 849c1d6..b6a0834 100644 --- a/src/session.cc +++ b/src/session.cc @@ -2,16 +2,18 @@ * @file session.cc * @brief Implementation of the Session class. * ------------------------------------------------------------------ **/ -#include <unistd.h> -#include <syslog.h> +#include "session.h" #include "argparser.h" #include "convert.h" #include "globals.h" -#include "session.h" #include "tools.h" -#include <string> + #include <map> +#include <string> + +#include <syslog.h> +#include <unistd.h> using namespace ::std; using namespace Binc; @@ -133,7 +135,7 @@ int Session::getReadBytes(void) const } //---------------------------------------------------------------------- -bool Session::parseCommandLine(int argc, char * argv[]) +bool Session::parseCommandLine(int argc, char *argv[]) { args.addOptional("h|help", "Display this help screen", true); args.addOptional("version", "Display the version of Binc IMAP", true); @@ -159,20 +161,15 @@ bool Session::parseCommandLine(int argc, char * argv[]) //---------------------------------------------------------------------- void Session::assignCommandLineArgs(void) { - if (args.hasArg("allow-plain")) - setEnv("ALLOW_NONSSL_PLAINTEXT_LOGINS", "yes"); + if (args.hasArg("allow-plain")) setEnv("ALLOW_NONSSL_PLAINTEXT_LOGINS", "yes"); - if (args.hasArg("show-version")) - setEnv("SHOW_VERSION_IN_GREETING", "yes"); + if (args.hasArg("show-version")) setEnv("SHOW_VERSION_IN_GREETING", "yes"); - if (args.hasArg("log-type")) - setEnv("LOG_TYPE", args["log-type"]); + if (args.hasArg("log-type")) setEnv("LOG_TYPE", args["log-type"]); - if (args.hasArg("depot")) - setEnv("DEPOT", args["depot"]); + if (args.hasArg("depot")) setEnv("DEPOT", args["depot"]); - if (args.hasArg("delimiter")) - setEnv("DELIMITER", args["delimiter"]); + if (args.hasArg("delimiter")) setEnv("DELIMITER", args["delimiter"]); } //---------------------------------------------------------------------- @@ -208,8 +205,7 @@ void Session::clearResponseCode(void) const //---------------------------------------------------------------------- pid_t Session::getPid(void) { - if (pid == 0) - pid = getpid(); + if (pid == 0) pid = getpid(); return pid; } |