Another huge compilation fix

please delete cache and re-run cmake
This commit is contained in:
Yehonal
2017-08-20 04:48:07 +02:00
parent e471c1bb6a
commit 0dd68dfbee
108 changed files with 4784 additions and 4744 deletions
+42 -47
View File
@@ -53,28 +53,28 @@ void WardenWin::Init(WorldSession* session, BigNumber *k)
_inputCrypto.Init(_inputKey);
_outputCrypto.Init(_outputKey);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Server side warden for client %u initializing...", session->GetAccountId());
#endif
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "C->S Key: %s", ByteArrayToHexStr(_inputKey, 16).c_str());
#endif
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "S->C Key: %s", ByteArrayToHexStr(_outputKey, 16).c_str());
#endif
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, " Seed: %s", ByteArrayToHexStr(_seed, 16).c_str());
#endif
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Loading Module...");
#endif
_module = GetModuleForClient();
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Module Key: %s", ByteArrayToHexStr(_module->Key, 16).c_str());
#endif
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Module ID: %s", ByteArrayToHexStr(_module->Id, 16).c_str());
#endif
RequestModule();
@@ -103,7 +103,7 @@ ClientWardenModule* WardenWin::GetModuleForClient()
void WardenWin::InitializeModule()
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Initialize module");
#endif
@@ -149,7 +149,7 @@ void WardenWin::InitializeModule()
void WardenWin::RequestHash()
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request hash");
#endif
@@ -173,14 +173,14 @@ void WardenWin::HandleHashResult(ByteBuffer &buff)
// Verify key
if (memcmp(buff.contents() + 1, Module.ClientKeySeedHash, 20) != 0)
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: failed");
#endif
Penalty();
return;
}
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request hash reply: succeed");
#endif
@@ -198,7 +198,7 @@ void WardenWin::HandleHashResult(ByteBuffer &buff)
void WardenWin::RequestData()
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Request data");
#endif
@@ -350,14 +350,14 @@ void WardenWin::RequestData()
for (std::list<uint16>::iterator itr = _currentChecks.begin(); itr != _currentChecks.end(); ++itr)
stream << *itr << " ";
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "%s", stream.str().c_str());
#endif
}
void WardenWin::HandleData(ByteBuffer &buff)
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Handle data");
#endif
@@ -372,7 +372,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (!IsValidCheckSum(Checksum, buff.contents() + buff.rpos(), Length))
{
buff.rpos(buff.wpos());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "CHECKSUM FAIL");
#endif
Penalty();
@@ -386,7 +386,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
// TODO: test it.
if (result == 0x00)
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "TIMING CHECK FAIL result 0x00");
#endif
Penalty();
@@ -399,16 +399,16 @@ void WardenWin::HandleData(ByteBuffer &buff)
uint32 ticksNow = World::GetGameTimeMS();
uint32 ourTicks = newClientTicks + (ticksNow - _serverTicks);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "ServerTicks %u", ticksNow); // Now
#endif
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RequestTicks %u", _serverTicks); // At request
#endif
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Ticks %u", newClientTicks); // At response
#endif
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Ticks diff %u", ourTicks - newClientTicks);
#endif
}
@@ -435,7 +435,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (Mem_Result != 0)
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MEM_CHECK not 0x00, CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
checkFailed = *itr;
@@ -444,7 +444,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (memcmp(buff.contents() + buff.rpos(), rs->Result.AsByteArray(0, false).get(), rd->Length) != 0)
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MEM_CHECK fail CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
checkFailed = *itr;
@@ -453,7 +453,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
}
buff.rpos(buff.rpos() + rd->Length);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MEM_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
break;
@@ -466,17 +466,15 @@ void WardenWin::HandleData(ByteBuffer &buff)
const uint8 byte = 0xE9;
if (memcmp(buff.contents() + buff.rpos(), &byte, sizeof(uint8)) != 0)
{
/*if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT PAGE_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
if (type == MODULE_CHECK)
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MODULE_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
if (type == DRIVER_CHECK)
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());*/
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
checkFailed = *itr;
buff.rpos(buff.rpos() + 1);
@@ -484,17 +482,14 @@ void WardenWin::HandleData(ByteBuffer &buff)
}
buff.rpos(buff.rpos() + 1);
/*if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT PAGE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
else if (type == MODULE_CHECK)
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MODULE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
else if (type == DRIVER_CHECK)
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());*/
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
if (type == PAGE_CHECK_A || type == PAGE_CHECK_B)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT PAGE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
else if (type == MODULE_CHECK)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MODULE_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
else if (type == DRIVER_CHECK)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT DRIVER_CHECK passed CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
break;
}
@@ -505,7 +500,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (Lua_Result != 0)
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT LUA_STR_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
checkFailed = *itr;
@@ -520,13 +515,13 @@ void WardenWin::HandleData(ByteBuffer &buff)
char *str = new char[luaStrLen + 1];
memcpy(str, buff.contents() + buff.rpos(), luaStrLen);
str[luaStrLen] = '\0'; // null terminator
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "Lua string: %s", str);
#endif
delete[] str;
}
buff.rpos(buff.rpos() + luaStrLen); // Skip string
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT LUA_STR_CHECK passed, CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
break;
@@ -538,7 +533,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (Mpq_Result != 0)
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK not 0x00 account id %u", _session->GetAccountId());
#endif
checkFailed = *itr;
@@ -547,7 +542,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
if (memcmp(buff.contents() + buff.rpos(), rs->Result.AsByteArray(0, false).get(), 20) != 0) // SHA1
{
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK fail, CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
checkFailed = *itr;
@@ -556,7 +551,7 @@ void WardenWin::HandleData(ByteBuffer &buff)
}
buff.rpos(buff.rpos() + 20); // 20 bytes SHA1
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_WARDEN, "RESULT MPQ_CHECK passed, CheckId %u account Id %u", *itr, _session->GetAccountId());
#endif
break;