summaryrefslogtreecommitdiffstats
path: root/source/cSocketThreads.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-20 00:00:00 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-20 00:00:00 +0100
commit0b616909e3472a4360e22d6b01749ee44092e967 (patch)
tree6a70857aa2839acd133b77fcc225af6828cb8f39 /source/cSocketThreads.cpp
parentFixed assertion bug in NamedEntitySpawn packet, it used to assert when item ID is 0, but now 0 is allowed (diff)
downloadcuberite-0b616909e3472a4360e22d6b01749ee44092e967.tar
cuberite-0b616909e3472a4360e22d6b01749ee44092e967.tar.gz
cuberite-0b616909e3472a4360e22d6b01749ee44092e967.tar.bz2
cuberite-0b616909e3472a4360e22d6b01749ee44092e967.tar.lz
cuberite-0b616909e3472a4360e22d6b01749ee44092e967.tar.xz
cuberite-0b616909e3472a4360e22d6b01749ee44092e967.tar.zst
cuberite-0b616909e3472a4360e22d6b01749ee44092e967.zip
Diffstat (limited to 'source/cSocketThreads.cpp')
-rw-r--r--source/cSocketThreads.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/cSocketThreads.cpp b/source/cSocketThreads.cpp
index 9d9258499..aa0aba678 100644
--- a/source/cSocketThreads.cpp
+++ b/source/cSocketThreads.cpp
@@ -156,7 +156,7 @@ cSocketThreads::cSocketThread::~cSocketThread()
void cSocketThreads::cSocketThread::AddClient(cSocket * a_Socket, cCallback * a_Client)
{
- assert(m_NumSlots < MAX_SLOTS); // Use HasEmptySlot() to check before adding
+ ASSERT(m_NumSlots < MAX_SLOTS); // Use HasEmptySlot() to check before adding
m_Slots[m_NumSlots].m_Client = a_Client;
m_Slots[m_NumSlots].m_Socket = a_Socket;
@@ -164,7 +164,7 @@ void cSocketThreads::cSocketThread::AddClient(cSocket * a_Socket, cCallback * a_
m_NumSlots++;
// Notify the thread of the change:
- assert(m_ControlSocket2.IsValid());
+ ASSERT(m_ControlSocket2.IsValid());
m_ControlSocket2.Send("a", 1);
}
@@ -193,7 +193,7 @@ bool cSocketThreads::cSocketThread::RemoveClient(const cCallback * a_Client)
m_NumSlots--;
// Notify the thread of the change:
- assert(m_ControlSocket2.IsValid());
+ ASSERT(m_ControlSocket2.IsValid());
m_ControlSocket2.Send("r", 1);
return true;
} // for i - m_Slots[]
@@ -227,7 +227,7 @@ bool cSocketThreads::cSocketThread::RemoveSocket(const cSocket * a_Socket)
m_NumSlots--;
// Notify the thread of the change:
- assert(m_ControlSocket2.IsValid());
+ ASSERT(m_ControlSocket2.IsValid());
m_ControlSocket2.Send("r", 1);
return true;
} // for i - m_Slots[]
@@ -245,7 +245,7 @@ bool cSocketThreads::cSocketThread::NotifyWrite(const cCallback * a_Client)
if (HasClient(a_Client))
{
// Notify the thread that there's another packet in the queue:
- assert(m_ControlSocket2.IsValid());
+ ASSERT(m_ControlSocket2.IsValid());
m_ControlSocket2.Send("q", 1);
return true;
}
@@ -354,7 +354,7 @@ void cSocketThreads::cSocketThread::Execute(void)
Addr.Family = cSocket::ADDRESS_FAMILY_INTERNET;
Addr.Address = cSocket::INTERNET_ADDRESS_LOCALHOST();
Addr.Port = m_ControlSocket2.GetPort();
- assert(Addr.Port != 0); // We checked in the Start() method, but let's be sure
+ ASSERT(Addr.Port != 0); // We checked in the Start() method, but let's be sure
if (m_ControlSocket1.Connect(Addr) != 0)
{
LOGERROR("Cannot connect Control sockets for a cSocketThread (\"%s\"); continuing, but the server may be unreachable from now on.", cSocket::GetLastErrorString().c_str());
@@ -509,7 +509,7 @@ void cSocketThreads::cSocketThread::WriteToSockets(fd_set * a_Write)
// If there's any data left, signalize the Control socket:
if (!m_Slots[i].m_Outgoing.empty())
{
- assert(m_ControlSocket2.IsValid());
+ ASSERT(m_ControlSocket2.IsValid());
m_ControlSocket2.Send("q", 1);
}
*/