aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-08-22 20:22:32 +0200
committerShauren <shauren.trinity@gmail.com>2012-08-22 20:22:32 +0200
commit6c2ad888e7a2cf82d8c2be01c955f49ed60b5efc (patch)
treed533c20d5ecde6feb1effb7a6fcd4ebfff6b3a61
parent28a81b3d2376694760b0add783389f6584f429c6 (diff)
Core/Logging: Fixed opcode logging
-rw-r--r--src/server/game/Server/WorldSocket.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 4e8292c621e..246b1424f23 100644
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -677,8 +677,8 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
if (sPacketLog->CanLogPacket())
sPacketLog->LogPacket(*new_pct, CLIENT_TO_SERVER);
- char const* opcodeName = GetOpcodeNameForLogging(opcode).c_str();
- sLog->outInfo(LOG_FILTER_OPCODES, "C->S: %s", opcodeName);
+ std::string opcodeName = GetOpcodeNameForLogging(opcode);
+ sLog->outInfo(LOG_FILTER_OPCODES, "C->S: %s", opcodeName.c_str());
try
{
@@ -701,14 +701,14 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
return 0;
case CMSG_LOG_DISCONNECT:
new_pct->rfinish(); // contains uint32 disconnectReason;
- sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", opcodeName);
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", opcodeName.c_str());
sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct));
return 0;
// not an opcode, client sends string "WORLD OF WARCRAFT CONNECTION - CLIENT TO SERVER" without opcode
// first 4 bytes become the opcode (2 dropped)
case MSG_VERIFY_CONNECTIVITY:
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", opcodeName);
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", opcodeName.c_str());
sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct));
std::string str;
*new_pct >> str;
@@ -718,7 +718,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
}
case CMSG_ENABLE_NAGLE:
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", opcodeName);
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", opcodeName.c_str());
sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct));
return m_Session ? m_Session->HandleEnableNagleAlgorithm() : -1;
}
@@ -754,7 +754,7 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
catch (ByteBufferException &)
{
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSocket::ProcessIncoming ByteBufferException occured while parsing an instant handled packet %s from client %s, accountid=%i. Disconnected client.",
- opcodeName, GetRemoteAddress().c_str(), m_Session ? int32(m_Session->GetAccountId()) : -1);
+ opcodeName.c_str(), GetRemoteAddress().c_str(), m_Session ? int32(m_Session->GetAccountId()) : -1);
new_pct->hexlike();
return -1;
}