*Update to Mangos 6902. Source: Mangos.

*Skipped rev: rev 6893, some code about waypoint movement.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-12 11:21:28 -06:00
parent 135f39a5ef
commit b6c288ca9f
84 changed files with 785 additions and 705 deletions

View File

@@ -114,10 +114,9 @@ void WorldSocket::CloseSocket (void)
ACE_GUARD (LockType, Guard, m_OutBufferLock);
if (closing_)
return;
return;
closing_ = true;
peer ().close_writer ();
}
@@ -263,7 +262,7 @@ int WorldSocket::handle_input (ACE_HANDLE)
if ((errno == EWOULDBLOCK) ||
(errno == EAGAIN))
{
return Update (); // interesting line ,isn't it ?
return Update (); // interesting line ,isn't it ?
}
DEBUG_LOG ("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
@@ -281,7 +280,7 @@ int WorldSocket::handle_input (ACE_HANDLE)
case 1:
return 1;
default:
return Update (); // another interesting line ;)
return Update (); // another interesting line ;)
}
ACE_NOTREACHED(return -1);
@@ -475,7 +474,7 @@ int WorldSocket::handle_input_missing_data (void)
return -1;
}
// We just received nice new header
// We just received nice new header
if (handle_input_header () == -1)
{
ACE_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
@@ -718,6 +717,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
uint32 world_expansion = sWorld.getConfig(CONFIG_EXPANSION);
if(expansion > world_expansion)
expansion = world_expansion;
//expansion = ((sWorld.getConfig(CONFIG_EXPANSION) > fields[8].GetUInt8()) ? fields[8].GetUInt8() : sWorld.getConfig(CONFIG_EXPANSION));
N.SetHexStr ("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7");
g.SetDword (7);
@@ -739,8 +739,8 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
x.SetBinary (sha1.GetDigest (), sha1.GetLength ());
v = g.ModExp (x, N);
const char* sStr = s.AsHexStr (); //Must be freed by OPENSSL_free()
const char* vStr = v.AsHexStr (); //Must be freed by OPENSSL_free()
const char* sStr = s.AsHexStr (); //Must be freed by OPENSSL_free()
const char* vStr = v.AsHexStr (); //Must be freed by OPENSSL_free()
const char* vold = fields[6].GetString ();
DEBUG_LOG ("WorldSocket::HandleAuthSession: (s,v) check s: %s v_old: %s v_new: %s",
@@ -830,7 +830,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
SendPacket (packet);
sLog.outBasic ("WorldSocket::HandleAuthSession: User tryes to login but his security level is not enough");
sLog.outBasic ("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
return -1;
}
@@ -945,7 +945,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
ACE_GUARD_RETURN (LockType, Guard, m_SessionLock, -1);
if (m_Session)
m_Session->SetLatency (latency);
m_Session->SetLatency (latency);
else
{
sLog.outError ("WorldSocket::HandlePing: peer sent CMSG_PING, "