From d7ca4d67b5caec6608f365b71560fe4f31197c96 Mon Sep 17 00:00:00 2001 From: lotodore Date: Wed, 6 May 2009 21:09:58 +0000 Subject: [PATCH] Fixing compiler errors. Still broken in terms of network functionality. --- src/net/common/serverlobbythread.cpp | 8 ++++---- src/net/netcontext.h | 3 +++ src/net/servergamethread.h | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index a4b20755..8010010f 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -513,9 +513,9 @@ ServerLobbyThread::HandleRead(SessionId sessionId, const boost::system::error_co { boost::shared_ptr packet = buf.receivedPackets.front(); buf.receivedPackets.pop_front(); - if (game) - game->HandlePacket(session, packet); - else +// if (game) +// game->HandlePacket(session, packet); +// else HandlePacket(session, packet); } session.sessionData->GetAsioSocket()->async_read_some( @@ -533,7 +533,7 @@ ServerLobbyThread::HandleRead(SessionId sessionId, const boost::system::error_co boost::shared_ptr game; if (gameId) { - GameMap::iterator pos = m_gameMap.find(joinGameData.gameId); + GameMap::iterator pos = m_gameMap.find(gameId); if (pos != m_gameMap.end()) game = pos->second; diff --git a/src/net/netcontext.h b/src/net/netcontext.h index b55da783..9520a881 100644 --- a/src/net/netcontext.h +++ b/src/net/netcontext.h @@ -23,6 +23,9 @@ #include +#ifndef _WIN32 + #define SOCKET int +#endif class NetContext { diff --git a/src/net/servergamethread.h b/src/net/servergamethread.h index 294b2d29..2978bcb7 100644 --- a/src/net/servergamethread.h +++ b/src/net/servergamethread.h @@ -171,6 +171,7 @@ private: boost::timers::portable::microsec_timer m_voteKickActionTimer; +friend class ServerLobbyThread; friend class AbstractServerGameStateReceiving; friend class AbstractServerGameStateRunning; friend class AbstractServerGameStateTimer;