summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/HTTPConnection.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
committerarchshift <admin@archshift.com>2014-10-23 05:12:49 +0200
commita26541a7c3ced0569098edd0aae61c097c2912f4 (patch)
tree4b7bea204c0ddd18bb4f95357f9eb77590bc2e8d /src/HTTPServer/HTTPConnection.cpp
parentComposableGenerator: Removed nullptr initializers. (diff)
downloadcuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.gz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.bz2
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.lz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.xz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.zst
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.zip
Diffstat (limited to '')
-rw-r--r--src/HTTPServer/HTTPConnection.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/HTTPServer/HTTPConnection.cpp b/src/HTTPServer/HTTPConnection.cpp
index bf46bb241..d5dbf0199 100644
--- a/src/HTTPServer/HTTPConnection.cpp
+++ b/src/HTTPServer/HTTPConnection.cpp
@@ -15,7 +15,7 @@
cHTTPConnection::cHTTPConnection(cHTTPServer & a_HTTPServer) :
m_HTTPServer(a_HTTPServer),
m_State(wcsRecvHeaders),
- m_CurrentRequest(NULL),
+ m_CurrentRequest(nullptr),
m_CurrentRequestBodyRemaining(0)
{
// LOGD("HTTP: New connection at %p", this);
@@ -29,7 +29,7 @@ cHTTPConnection::~cHTTPConnection()
{
// LOGD("HTTP: Connection deleting: %p", this);
delete m_CurrentRequest;
- m_CurrentRequest = NULL;
+ m_CurrentRequest = nullptr;
}
@@ -136,7 +136,7 @@ void cHTTPConnection::AwaitNextRequest(void)
void cHTTPConnection::Terminate(void)
{
- if (m_CurrentRequest != NULL)
+ if (m_CurrentRequest != nullptr)
{
m_HTTPServer.RequestFinished(*this, *m_CurrentRequest);
}
@@ -153,7 +153,7 @@ bool cHTTPConnection::DataReceived(const char * a_Data, size_t a_Size)
{
case wcsRecvHeaders:
{
- if (m_CurrentRequest == NULL)
+ if (m_CurrentRequest == nullptr)
{
m_CurrentRequest = new cHTTPRequest;
}
@@ -162,7 +162,7 @@ bool cHTTPConnection::DataReceived(const char * a_Data, size_t a_Size)
if (BytesConsumed == AString::npos)
{
delete m_CurrentRequest;
- m_CurrentRequest = NULL;
+ m_CurrentRequest = nullptr;
m_State = wcsInvalid;
m_HTTPServer.CloseConnection(*this);
return true;
@@ -196,7 +196,7 @@ bool cHTTPConnection::DataReceived(const char * a_Data, size_t a_Size)
case wcsRecvBody:
{
- ASSERT(m_CurrentRequest != NULL);
+ ASSERT(m_CurrentRequest != nullptr);
if (m_CurrentRequestBodyRemaining > 0)
{
size_t BytesToConsume = std::min(m_CurrentRequestBodyRemaining, (size_t)a_Size);
@@ -214,7 +214,7 @@ bool cHTTPConnection::DataReceived(const char * a_Data, size_t a_Size)
return true;
}
delete m_CurrentRequest;
- m_CurrentRequest = NULL;
+ m_CurrentRequest = nullptr;
}
break;
}
@@ -243,7 +243,7 @@ void cHTTPConnection::GetOutgoingData(AString & a_Data)
void cHTTPConnection::SocketClosed(void)
{
- if (m_CurrentRequest != NULL)
+ if (m_CurrentRequest != nullptr)
{
m_HTTPServer.RequestFinished(*this, *m_CurrentRequest);
}