Browse Source

Wrap NetLog stuff in !defined(PLASMA_EXTERNAL_RELEASE)

Michael Hansen 13 years ago
parent
commit
7cbcc8a6fc
  1. 10
      Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp

10
Sources/Plasma/NucleusLib/pnNetCli/pnNcCli.cpp

@ -42,6 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//#define NO_ENCRYPTION
#ifndef PLASMA_EXTERNAL_RELEASE
struct NetLogMessage_Header
{
unsigned m_protocol;
@ -67,6 +69,8 @@ static unsigned GetAdjustedTimer()
return maths.LowPart % 864000000;
}
#endif // PLASMA_EXTERNAL_RELEASE
namespace pnNetCli {
/*****************************************************************************
@ -153,6 +157,7 @@ static void PutBufferOnWire (NetCli * cli, void * data, unsigned bytes) {
byte * temp, * heap = NULL;
#ifndef PLASMA_EXTERNAL_RELEASE
// Write to the netlog
if (s_netlog) {
NetLogMessage_Header header;
@ -167,6 +172,7 @@ static void PutBufferOnWire (NetCli * cli, void * data, unsigned bytes) {
WriteFile(s_netlog, data, bytes, &bytesWritten, NULL);
LeaveCriticalSection(&s_pipeCritical);
}
#endif // PLASMA_EXTERNAL_RELEASE
if (cli->mode == kNetCliModeEncrypted) {
// Encrypt data...
@ -862,6 +868,7 @@ static NetCli * ConnCreate (
cli->mode = mode;
cli->SetValue(kNilGuid);
#ifndef PLASMA_EXTERNAL_RELEASE
// Network debug pipe
if (!s_netlog) {
InitializeCriticalSection(&s_pipeCritical);
@ -882,6 +889,7 @@ static NetCli * ConnCreate (
s_timeOffset.HighPart = timeBase.dwHighDateTime;
s_timeOffset.LowPart = timeBase.dwLowDateTime;
}
#endif // PLASMA_EXTERNAL_RELEASE
ResetSendRecv(cli);
@ -1070,6 +1078,7 @@ bool NetCliDispatch (
cli->input.Add(bytes, data);
bool result = DispatchData(cli, param);
#ifndef PLASMA_EXTERNAL_RELEASE
// Write to the netlog
if (s_netlog) {
NetLogMessage_Header header;
@ -1084,6 +1093,7 @@ bool NetCliDispatch (
WriteFile(s_netlog, data, bytes, &bytesWritten, NULL);
LeaveCriticalSection(&s_pipeCritical);
}
#endif // PLASMA_EXTERNAL_RELEASE
#ifdef SERVER
cli->recvDispatch = result;

Loading…
Cancel
Save