mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[10614] Replace ACE_ASSERT with MANGOS_ASSERT
This commit is contained in:
parent
57a88d2e3f
commit
a3c03eb919
3 changed files with 16 additions and 16 deletions
|
|
@ -174,11 +174,11 @@ int WorldSocket::SendPacket (const WorldPacket& pct)
|
||||||
{
|
{
|
||||||
// Put the packet on the buffer.
|
// Put the packet on the buffer.
|
||||||
if (m_OutBuffer->copy ((char*) header.header, header.getHeaderLength()) == -1)
|
if (m_OutBuffer->copy ((char*) header.header, header.getHeaderLength()) == -1)
|
||||||
ACE_ASSERT (false);
|
MANGOS_ASSERT (false);
|
||||||
|
|
||||||
if (!pct.empty ())
|
if (!pct.empty ())
|
||||||
if (m_OutBuffer->copy ((char*) pct.contents (), pct.size ()) == -1)
|
if (m_OutBuffer->copy ((char*) pct.contents (), pct.size ()) == -1)
|
||||||
ACE_ASSERT (false);
|
MANGOS_ASSERT (false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -466,9 +466,9 @@ int WorldSocket::Update (void)
|
||||||
|
|
||||||
int WorldSocket::handle_input_header (void)
|
int WorldSocket::handle_input_header (void)
|
||||||
{
|
{
|
||||||
ACE_ASSERT (m_RecvWPct == NULL);
|
MANGOS_ASSERT (m_RecvWPct == NULL);
|
||||||
|
|
||||||
ACE_ASSERT (m_Header.length () == sizeof (ClientPktHeader));
|
MANGOS_ASSERT (m_Header.length () == sizeof (ClientPktHeader));
|
||||||
|
|
||||||
m_Crypt.DecryptRecv ((uint8*) m_Header.rd_ptr (), sizeof (ClientPktHeader));
|
m_Crypt.DecryptRecv ((uint8*) m_Header.rd_ptr (), sizeof (ClientPktHeader));
|
||||||
|
|
||||||
|
|
@ -497,7 +497,7 @@ int WorldSocket::handle_input_header (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ACE_ASSERT(m_RecvPct.space() == 0);
|
MANGOS_ASSERT(m_RecvPct.space() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -508,9 +508,9 @@ int WorldSocket::handle_input_payload (void)
|
||||||
// set errno properly here on error !!!
|
// set errno properly here on error !!!
|
||||||
// now have a header and payload
|
// now have a header and payload
|
||||||
|
|
||||||
ACE_ASSERT (m_RecvPct.space () == 0);
|
MANGOS_ASSERT (m_RecvPct.space () == 0);
|
||||||
ACE_ASSERT (m_Header.space () == 0);
|
MANGOS_ASSERT (m_Header.space () == 0);
|
||||||
ACE_ASSERT (m_RecvWPct != NULL);
|
MANGOS_ASSERT (m_RecvWPct != NULL);
|
||||||
|
|
||||||
const int ret = ProcessIncoming (m_RecvWPct);
|
const int ret = ProcessIncoming (m_RecvWPct);
|
||||||
|
|
||||||
|
|
@ -564,7 +564,7 @@ int WorldSocket::handle_input_missing_data (void)
|
||||||
if (m_Header.space () > 0)
|
if (m_Header.space () > 0)
|
||||||
{
|
{
|
||||||
// Couldn't receive the whole header this time.
|
// Couldn't receive the whole header this time.
|
||||||
ACE_ASSERT (message_block.length () == 0);
|
MANGOS_ASSERT (message_block.length () == 0);
|
||||||
errno = EWOULDBLOCK;
|
errno = EWOULDBLOCK;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -572,7 +572,7 @@ int WorldSocket::handle_input_missing_data (void)
|
||||||
// We just received nice new header
|
// We just received nice new header
|
||||||
if (handle_input_header () == -1)
|
if (handle_input_header () == -1)
|
||||||
{
|
{
|
||||||
ACE_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
MANGOS_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -598,7 +598,7 @@ int WorldSocket::handle_input_missing_data (void)
|
||||||
if (m_RecvPct.space () > 0)
|
if (m_RecvPct.space () > 0)
|
||||||
{
|
{
|
||||||
// Couldn't receive the whole data this time.
|
// Couldn't receive the whole data this time.
|
||||||
ACE_ASSERT (message_block.length () == 0);
|
MANGOS_ASSERT (message_block.length () == 0);
|
||||||
errno = EWOULDBLOCK;
|
errno = EWOULDBLOCK;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -607,7 +607,7 @@ int WorldSocket::handle_input_missing_data (void)
|
||||||
//just received fresh new payload
|
//just received fresh new payload
|
||||||
if (handle_input_payload () == -1)
|
if (handle_input_payload () == -1)
|
||||||
{
|
{
|
||||||
ACE_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
MANGOS_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -656,7 +656,7 @@ int WorldSocket::schedule_wakeup_output (GuardType& g)
|
||||||
|
|
||||||
int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
|
int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
|
||||||
{
|
{
|
||||||
ACE_ASSERT (new_pct);
|
MANGOS_ASSERT (new_pct);
|
||||||
|
|
||||||
// manage memory ;)
|
// manage memory ;)
|
||||||
ACE_Auto_Ptr<WorldPacket> aptr (new_pct);
|
ACE_Auto_Ptr<WorldPacket> aptr (new_pct);
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ class ReactorRunnable : protected ACE_Task_Base
|
||||||
|
|
||||||
WorldDatabase.ThreadStart ();
|
WorldDatabase.ThreadStart ();
|
||||||
|
|
||||||
ACE_ASSERT (m_Reactor);
|
MANGOS_ASSERT (m_Reactor);
|
||||||
|
|
||||||
SocketSet::iterator i, t;
|
SocketSet::iterator i, t;
|
||||||
|
|
||||||
|
|
@ -353,7 +353,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
|
||||||
// we skip the Acceptor Thread
|
// we skip the Acceptor Thread
|
||||||
size_t min = 1;
|
size_t min = 1;
|
||||||
|
|
||||||
ACE_ASSERT (m_NetThreadsCount >= 1);
|
MANGOS_ASSERT (m_NetThreadsCount >= 1);
|
||||||
|
|
||||||
for (size_t i = 1; i < m_NetThreadsCount; ++i)
|
for (size_t i = 1; i < m_NetThreadsCount; ++i)
|
||||||
if (m_NetThreads[i].Connections () < m_NetThreads[min].Connections ())
|
if (m_NetThreads[i].Connections () < m_NetThreads[min].Connections ())
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10613"
|
#define REVISION_NR "10614"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue