Merge branch 'master' into 303

Conflicts:
	src/game/WorldSocket.cpp
	src/shared/Database/DBCStructure.h
	src/shared/Database/DBCfmt.cpp
This commit is contained in:
tomrus88 2008-11-10 01:10:52 +03:00
commit 6fae544fbe
23 changed files with 280 additions and 118 deletions

View file

@ -261,7 +261,7 @@ int WorldSocket::handle_input (ACE_HANDLE)
if ((errno == EWOULDBLOCK) ||
(errno == EAGAIN))
{
return Update (); // interesting line ,isnt it ?
return Update (); // interesting line ,isn't it ?
}
DEBUG_LOG ("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
@ -460,20 +460,20 @@ int WorldSocket::handle_input_missing_data (void)
{
if (m_Header.space () > 0)
{
//need to recieve the header
//need to receive the header
const size_t to_header = (message_block.length () > m_Header.space () ? m_Header.space () : message_block.length ());
m_Header.copy (message_block.rd_ptr (), to_header);
message_block.rd_ptr (to_header);
if (m_Header.space () > 0)
{
//couldnt recieve the whole header this time
// Couldn't receive the whole header this time.
ACE_ASSERT (message_block.length () == 0);
errno = EWOULDBLOCK;
return -1;
}
//we just recieved nice new header
// We just received nice new header
if (handle_input_header () == -1)
{
ACE_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
@ -482,16 +482,16 @@ int WorldSocket::handle_input_missing_data (void)
}
// Its possible on some error situations that this happens
// for example on closing when epoll recieves more chunked data and stuff
// for example on closing when epoll receives more chunked data and stuff
// hope this is not hack ,as proper m_RecvWPct is asserted around
if (!m_RecvWPct)
{
sLog.outError ("Forsing close on input m_RecvWPct = NULL");
sLog.outError ("Forcing close on input m_RecvWPct = NULL");
errno = EINVAL;
return -1;
}
// We have full readed header, now check the data payload
// We have full read header, now check the data payload
if (m_RecvPct.space () > 0)
{
//need more data in the payload
@ -501,14 +501,14 @@ int WorldSocket::handle_input_missing_data (void)
if (m_RecvPct.space () > 0)
{
//couldnt recieve the whole data this time
// Couldn't receive the whole data this time.
ACE_ASSERT (message_block.length () == 0);
errno = EWOULDBLOCK;
return -1;
}
}
//just recieved fresh new payload
//just received fresh new payload
if (handle_input_payload () == -1)
{
ACE_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
@ -570,7 +570,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
if (closing_)
return -1;
// dump recieved packet
// Dump received packet.
if (sWorldLog.LogWorld ())
{
sWorldLog.Log ("CLIENT:\nSOCKET: %u\nLENGTH: %u\nOPCODE: %s (0x%.4X)\nDATA:\n",
@ -635,7 +635,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
{
// NOTE: ATM the socket is singlethreaded, have this in mind ...
// NOTE: ATM the socket is singlethread, have this in mind ...
uint8 digest[20];
uint32 clientSeed;
uint32 unk2, unk3;
@ -927,7 +927,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
if (m_Session && m_Session->GetSecurity () == SEC_PLAYER)
{
sLog.outError ("WorldSocket::HandlePing: Player kicked for "
"overspeeded pings address = %s",
"over-speed pings address = %s",
GetRemoteAddress ().c_str ());
return -1;