Eliminate race condition in World Log.

In has been introduced with multithreaded packet processing, and prevents the dump from being written correctly, e.g. with tools.
This commit is contained in:
LordJZ 2012-07-31 00:38:45 +04:00
parent 19e03b0890
commit e45969b9ec
2 changed files with 3 additions and 0 deletions

View file

@ -717,6 +717,8 @@ void Log::outWorldPacketDump(uint32 socket, uint32 opcode, char const* opcodeNam
if (!worldLogfile)
return;
ACE_GUARD(ACE_Thread_Mutex, GuardObj, m_worldLogMtx);
outTimestamp(worldLogfile);
fprintf(worldLogfile, "\n%s:\nSOCKET: %u\nLENGTH: " SIZEFMTD "\nOPCODE: %s (0x%.4X)\nDATA:\n",