mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
feat(Core/Sockets): replace ACE_ASSERT to default core ASSERT (#4950)
This commit is contained in:
@@ -167,11 +167,11 @@ int WorldSocket::SendPacket(WorldPacket const& pct)
|
||||
{
|
||||
// Put the packet on the buffer.
|
||||
if (m_OutBuffer->copy((char*) header.header, header.getHeaderLength()) == -1)
|
||||
ACE_ASSERT (false);
|
||||
ABORT();
|
||||
|
||||
if (!pct.empty())
|
||||
if (m_OutBuffer->copy((char*) pct.contents(), pct.size()) == -1)
|
||||
ACE_ASSERT (false);
|
||||
ABORT();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -463,9 +463,8 @@ int WorldSocket::Update(void)
|
||||
|
||||
int WorldSocket::handle_input_header(void)
|
||||
{
|
||||
ACE_ASSERT (m_RecvWPct == nullptr);
|
||||
|
||||
ACE_ASSERT (m_Header.length() == sizeof(ClientPktHeader));
|
||||
ASSERT(m_RecvWPct == nullptr);
|
||||
ASSERT(m_Header.length() == sizeof(ClientPktHeader));
|
||||
|
||||
if (m_Crypt.IsInitialized())
|
||||
m_Crypt.DecryptRecv((uint8*) m_Header.rd_ptr(), sizeof(ClientPktHeader));
|
||||
@@ -495,7 +494,7 @@ int WorldSocket::handle_input_header(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
ACE_ASSERT(m_RecvPct.space() == 0);
|
||||
ASSERT(m_RecvPct.space() == 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -506,9 +505,9 @@ int WorldSocket::handle_input_payload(void)
|
||||
// set errno properly here on error !!!
|
||||
// now have a header and payload
|
||||
|
||||
ACE_ASSERT (m_RecvPct.space() == 0);
|
||||
ACE_ASSERT (m_Header.space() == 0);
|
||||
ACE_ASSERT (m_RecvWPct != nullptr);
|
||||
ASSERT(m_RecvPct.space() == 0);
|
||||
ASSERT(m_Header.space() == 0);
|
||||
ASSERT(m_RecvWPct != nullptr);
|
||||
|
||||
const int ret = ProcessIncoming (m_RecvWPct);
|
||||
|
||||
@@ -562,7 +561,7 @@ int WorldSocket::handle_input_missing_data(void)
|
||||
if (m_Header.space() > 0)
|
||||
{
|
||||
// Couldn't receive the whole header this time.
|
||||
ACE_ASSERT (message_block.length() == 0);
|
||||
ASSERT(message_block.length() == 0);
|
||||
errno = EWOULDBLOCK;
|
||||
return -1;
|
||||
}
|
||||
@@ -570,7 +569,7 @@ int WorldSocket::handle_input_missing_data(void)
|
||||
// We just received nice new header
|
||||
if (handle_input_header() == -1)
|
||||
{
|
||||
ACE_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
||||
ASSERT((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -596,7 +595,7 @@ int WorldSocket::handle_input_missing_data(void)
|
||||
if (m_RecvPct.space() > 0)
|
||||
{
|
||||
// Couldn't receive the whole data this time.
|
||||
ACE_ASSERT (message_block.length() == 0);
|
||||
ASSERT(message_block.length() == 0);
|
||||
errno = EWOULDBLOCK;
|
||||
return -1;
|
||||
}
|
||||
@@ -605,7 +604,7 @@ int WorldSocket::handle_input_missing_data(void)
|
||||
//just received fresh new payload
|
||||
if (handle_input_payload() == -1)
|
||||
{
|
||||
ACE_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
||||
ASSERT((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -654,7 +653,7 @@ int WorldSocket::schedule_wakeup_output(GuardType& g)
|
||||
|
||||
int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
|
||||
{
|
||||
ACE_ASSERT (new_pct);
|
||||
ASSERT(new_pct);
|
||||
|
||||
// manage memory ;)
|
||||
std::unique_ptr<WorldPacket> aptr (new_pct);
|
||||
|
||||
Reference in New Issue
Block a user