diff options
Diffstat (limited to 'src/session.cc')
-rw-r--r-- | src/session.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/session.cc b/src/session.cc index 41192cb..aa09abe 100644 --- a/src/session.cc +++ b/src/session.cc @@ -21,7 +21,7 @@ using std::string; extern char **environ; -Session::Session(void) +Session::Session() { readbytes = 0; writebytes = 0; @@ -31,13 +31,13 @@ Session::Session(void) logfacility = LOG_DAEMON; } -Session &Session::getInstance(void) +Session &Session::getInstance() { static Session session; return session; } -int Session::getState(void) const +int Session::getState() const { return state; } @@ -47,7 +47,7 @@ void Session::setState(int n) state = n; } -const string &Session::getUserID(void) const +const string &Session::getUserID() const { return userid; } @@ -57,7 +57,7 @@ void Session::setUserID(const string &s) userid = s; } -const string &Session::getIP(void) const +const string &Session::getIP() const { return ip; } @@ -72,17 +72,17 @@ void Session::setLogFacility(int facility) logfacility = facility; } -int Session::getLogFacility(void) const +int Session::getLogFacility() const { return logfacility; } -void Session::addBody(void) +void Session::addBody() { ++bodies; } -void Session::addStatement(void) +void Session::addStatement() { ++statements; } @@ -97,22 +97,22 @@ void Session::addWriteBytes(int i) writebytes += i; } -int Session::getBodies(void) const +int Session::getBodies() const { return bodies; } -int Session::getStatements(void) const +int Session::getStatements() const { return statements; } -int Session::getWriteBytes(void) const +int Session::getWriteBytes() const { return writebytes; } -int Session::getReadBytes(void) const +int Session::getReadBytes() const { return readbytes; } @@ -140,7 +140,7 @@ bool Session::parseCommandLine(int argc, char *argv[]) return true; } -void Session::assignCommandLineArgs(void) +void Session::assignCommandLineArgs() { if (args.hasArg("allow-plain")) setEnv("ALLOW_NONSSL_PLAINTEXT_LOGINS", "yes"); @@ -153,7 +153,7 @@ void Session::assignCommandLineArgs(void) if (args.hasArg("delimiter")) setEnv("DELIMITER", args["delimiter"]); } -const string &Session::getLastError(void) const +const string &Session::getLastError() const { return lastError; } @@ -163,7 +163,7 @@ void Session::setLastError(const string &error) const lastError = error; } -const string &Session::getResponseCode(void) const +const string &Session::getResponseCode() const { return responseCode; } @@ -173,12 +173,12 @@ void Session::setResponseCode(const string &code) const responseCode = "[" + code + "] "; } -void Session::clearResponseCode(void) const +void Session::clearResponseCode() const { responseCode = ""; } -pid_t Session::getPid(void) +pid_t Session::getPid() { if (pid == 0) pid = getpid(); |