mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 17:43:47 +00:00
changed DISABLED_ cmake variable to ENABLED_ and implemented for all disabled logs
This commit is contained in:
@@ -193,8 +193,12 @@ void WorldSession::SendPacket(WorldPacket const* packet)
|
||||
{
|
||||
uint64 minTime = uint64(cur_time - lastTime);
|
||||
uint64 fullTime = uint64(lastTime - firstTime);
|
||||
;//sLog->outDetail("Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u", sendPacketCount, sendPacketBytes, float(sendPacketCount)/fullTime, float(sendPacketBytes)/fullTime, uint32(fullTime));
|
||||
;//sLog->outDetail("Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount)/minTime, float(sendLastPacketBytes)/minTime);
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDetail("Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u", sendPacketCount, sendPacketBytes, float(sendPacketCount)/fullTime, float(sendPacketBytes)/fullTime, uint32(fullTime));
|
||||
#endif
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDetail("Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount)/minTime, float(sendLastPacketBytes)/minTime);
|
||||
#endif
|
||||
|
||||
lastTime = cur_time;
|
||||
sendLastPacketCount = 1;
|
||||
@@ -543,7 +547,9 @@ void WorldSession::LogoutPlayer(bool save)
|
||||
//! Client will respond by sending 3x CMSG_CANCEL_TRADE, which we currently dont handle
|
||||
WorldPacket data(SMSG_LOGOUT_COMPLETE, 0);
|
||||
SendPacket(&data);
|
||||
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
|
||||
#endif
|
||||
|
||||
//! Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ACCOUNT_ONLINE);
|
||||
@@ -969,7 +975,9 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
|
||||
|
||||
addonInfo >> enabled >> crc >> unk1;
|
||||
|
||||
;//sLog->outDetail("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDetail("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
|
||||
#endif
|
||||
|
||||
AddonInfo addon(addonName, enabled, crc, 2, true);
|
||||
|
||||
@@ -982,15 +990,21 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
|
||||
match = false;
|
||||
|
||||
if (!match)
|
||||
;//sLog->outDetail("ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDetail("ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
|
||||
#endif
|
||||
else
|
||||
;//sLog->outDetail("ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDetail("ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
AddonMgr::SaveAddon(addon);
|
||||
|
||||
;//sLog->outDetail("ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDetail("ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
|
||||
#endif
|
||||
}
|
||||
|
||||
// TODO: Find out when to not use CRC/pubkey, and other possible states.
|
||||
@@ -999,10 +1013,14 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
|
||||
|
||||
uint32 currentTime;
|
||||
addonInfo >> currentTime;
|
||||
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "ADDON: CurrentTime: %u", currentTime);
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "ADDON: CurrentTime: %u", currentTime);
|
||||
#endif
|
||||
|
||||
//if (addonInfo.rpos() != addonInfo.size())
|
||||
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "packet under-read!");
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "packet under-read!");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
sLog->outError("Addon packet uncompress error!");
|
||||
@@ -1044,7 +1062,9 @@ void WorldSession::SendAddonsInfo()
|
||||
data << uint8(usepk);
|
||||
if (usepk) // if CRC is wrong, add public key (client need it)
|
||||
{
|
||||
;//sLog->outDetail("ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey",
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDetail("ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey",
|
||||
#endif
|
||||
// itr->CRC, itr->Name.c_str(), STANDARD_ADDON_CRC);
|
||||
|
||||
data.append(addonPublicKey, sizeof(addonPublicKey));
|
||||
|
||||
@@ -282,14 +282,18 @@ int WorldSocket::handle_input (ACE_HANDLE)
|
||||
return Update(); // interesting line, isn't it ?
|
||||
}
|
||||
|
||||
;//sLog->outStaticDebug("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outStaticDebug("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
|
||||
#endif
|
||||
|
||||
errno = ECONNRESET;
|
||||
return -1;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
;//sLog->outStaticDebug("WorldSocket::handle_input: Peer has closed connection");
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outStaticDebug("WorldSocket::handle_input: Peer has closed connection");
|
||||
#endif
|
||||
|
||||
errno = ECONNRESET;
|
||||
return -1;
|
||||
@@ -752,7 +756,9 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
recvPacket >> unk4;
|
||||
recvPacket.read(digest, 20);
|
||||
|
||||
;//sLog->outStaticDebug ("WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u",
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outStaticDebug ("WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u",
|
||||
#endif
|
||||
// BuiltNumberClient,
|
||||
// unk2,
|
||||
// account.c_str(),
|
||||
@@ -878,7 +884,9 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
|
||||
// Check locked state for server
|
||||
AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit();
|
||||
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "Allowed Level: %u Player Level %u", allowedAccountType, AccountTypes(security));
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Allowed Level: %u Player Level %u", allowedAccountType, AccountTypes(security));
|
||||
#endif
|
||||
if (AccountTypes(security) < allowedAccountType)
|
||||
{
|
||||
WorldPacket Packet (SMSG_AUTH_RESPONSE, 1);
|
||||
@@ -886,7 +894,9 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
|
||||
SendPacket(packet);
|
||||
|
||||
;//sLog->outDetail("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outDetail("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -914,7 +924,9 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
return -1;
|
||||
}
|
||||
|
||||
;//sLog->outStaticDebug("WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.",
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outStaticDebug("WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.",
|
||||
#endif
|
||||
// account.c_str(),
|
||||
// address.c_str());
|
||||
|
||||
|
||||
@@ -143,7 +143,9 @@ class ReactorRunnable : protected ACE_Task_Base
|
||||
|
||||
virtual int svc()
|
||||
{
|
||||
;//sLog->outStaticDebug ("Network Thread Starting");
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outStaticDebug ("Network Thread Starting");
|
||||
#endif
|
||||
|
||||
ACE_ASSERT (m_Reactor);
|
||||
|
||||
@@ -180,7 +182,9 @@ class ReactorRunnable : protected ACE_Task_Base
|
||||
}
|
||||
}
|
||||
|
||||
;//sLog->outStaticDebug ("Network Thread exits");
|
||||
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
|
||||
sLog->outStaticDebug ("Network Thread exits");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user