summaryrefslogtreecommitdiff
path: root/src/imapserver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/imapserver.cc')
-rw-r--r--src/imapserver.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/imapserver.cc b/src/imapserver.cc
index 4ec646d..b19bc90 100644
--- a/src/imapserver.cc
+++ b/src/imapserver.cc
@@ -1,10 +1,10 @@
-/** --------------------------------------------------------------------
+/**
* @file imapserver.cc
* @brief Implementation of the IMAPServer class.
* @author Andreas Aardal Hanssen
* @date 2005
- * --------------------------------------------------------------------
*/
+
#include "imapserver.h"
#include "broker.h"
@@ -14,8 +14,10 @@
#include "iofactory.h"
#include "session.h"
-using namespace ::Binc;
-using namespace ::std;
+#include <cstdint>
+
+using namespace Binc;
+using std::endl;
namespace Binc {
void showGreeting(void);
@@ -62,7 +64,7 @@ int IMAPServer::run(void)
{
Session &session = Session::getInstance();
bincLog.setOutputLevelLimit(IODevice::InfoLevel);
- string pid = to_string(session.getPid());
+ std::string pid = std::to_string(session.getPid());
bincDebug << "IMAPServer::run(), started server" << endl;
@@ -106,7 +108,7 @@ int IMAPServer::run(void)
Operator *o = broker->get(clientRequest.getName());
if (!o) {
serverStatus = RequestRejected;
- string err = "The command \"";
+ std::string err = "The command \"";
if (clientRequest.getUidMode()) err += "UID ";
err += clientRequest.getName();
err += "\" is unsupported in this state. ";
@@ -166,9 +168,9 @@ int IMAPServer::run(void)
if (skipToNextRequest) {
if (!bincClient.skipTo('\n')) {
- if (bincClient.getLastError() == IODevice::Timeout) {
+ if (bincClient.getLastError() == IODevice::Timeout)
serverStatus = Timeout;
- } else
+ else
serverStatus = ClientDisconnected;
break;
}
@@ -177,7 +179,7 @@ int IMAPServer::run(void)
// Session finished - write some log information
- string userID = this->stubMode ? session.getIP() : session.getEnv("USER");
+ std::string userID = this->stubMode ? session.getIP() : session.getEnv("USER");
if (this->stubMode) {
bincLog << "bincimap-up: pid " << pid << " (Read: " << session.getReadBytes()