huge cleanup and conversion of most string handling (especially paths) to unicode

please note: format strings must be %hs for char* arguments and %ls for
wchar_t*

This was SVN commit r7161.
This commit is contained in:
janwas
2009-11-03 21:46:35 +00:00
parent a46f3432f3
commit 8a52113e60
317 changed files with 2517 additions and 2588 deletions
+7 -6
View File
@@ -32,8 +32,9 @@
#include "NetSession.h"
#include "NetServer.h"
// DECLARATIONS
#define LOG_CATEGORY L"net"
// DECLARATIONS
CNetServer* g_NetServer = NULL;
//-----------------------------------------------------------------------------
@@ -120,7 +121,7 @@ bool CNetServer::Start( JSContext* UNUSED(pContext), uintN UNUSED(argc), jsval*
// Create new session
if ( !Create( m_Port, MAX_CLIENTS ) )
{
LOG( CLogger::Error, LOG_CAT_NET, "CNetServer::Run(): Initialize failed" );
LOG( CLogger::Error, LOG_CATEGORY, L"CNetServer::Run(): Initialize failed" );
return false;
}
@@ -412,7 +413,7 @@ bool CNetServer::OnError( void* pContext, CFsmEvent* pEvent )
else
{
// Weird stuff...
LOG( CLogger::Warning, LOG_CAT_NET, "NMT_ERROR: %s", pMessage->ToString().c_str() );
LOG( CLogger::Warning, LOG_CATEGORY, L"NMT_ERROR: %s", pMessage->ToString().c_str() );
}
}
@@ -481,7 +482,7 @@ bool CNetServer::OnAuthenticate( void* pContext, CFsmEvent* pEvent )
{
if ( pMessage->m_Password == pServer->m_PlayerPassword )
{
LOG( CLogger::Normal, LOG_CAT_NET, "Player authentication successful");
LOG( CLogger::Normal, LOG_CATEGORY, L"Player authentication successful");
pSession->SetName( pMessage->m_Name );
pSession->SetID( pServer->GetFreeSessionID() );
@@ -511,7 +512,7 @@ bool CNetServer::OnAuthenticate( void* pContext, CFsmEvent* pEvent )
}
else
{
LOG( CLogger::Warning, LOG_CAT_NET, "Player authentication failed" );
LOG( CLogger::Warning, LOG_CATEGORY, L"Player authentication failed" );
CAuthenticateResultMessage authenticateResult;
authenticateResult.m_Code = ARC_PASSWORD_INVALID;
@@ -1021,7 +1022,7 @@ void CNetServer::QueueIncomingCommand( CNetMessage* pMessage )
// Validate parameters
if ( !pMessage ) return;
//LOG( NORMAL, LOG_CAT_NET, "CNetServer::QueueIncomingCommand(): %s.", pMessage->ToString().c_str() );
//LOG( NORMAL, LOG_CATEGORY, L"CNetServer::QueueIncomingCommand(): %s.", pMessage->ToString().c_str() );
QueueMessage( 2, pMessage );
}