Additional verbose logging.
This commit is contained in:
@@ -21,6 +21,8 @@
|
|||||||
#include <net/netexception.h>
|
#include <net/netexception.h>
|
||||||
#include <net/socket_msg.h>
|
#include <net/socket_msg.h>
|
||||||
|
|
||||||
|
#include <core/loghelper.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@@ -3140,7 +3142,12 @@ NetPacketGameStart::SetData(const NetPacketGameStart::Data &inData)
|
|||||||
|
|
||||||
// Basic checking.
|
// Basic checking.
|
||||||
if (numPlayers < MIN_NUMBER_OF_PLAYERS || numPlayers > MAX_NUMBER_OF_PLAYERS || numPlayers != inData.startData.numberOfPlayers)
|
if (numPlayers < MIN_NUMBER_OF_PLAYERS || numPlayers > MAX_NUMBER_OF_PLAYERS || numPlayers != inData.startData.numberOfPlayers)
|
||||||
|
{
|
||||||
|
// This seems to occur too often.
|
||||||
|
// TODO needs fix.
|
||||||
|
LOG_VERBOSE("Invalid number of players. Slots: " << numPlayers << ", Players: " << inData.startData.numberOfPlayers << ".");
|
||||||
throw NetException(__FILE__, __LINE__, ERR_NET_INVALID_PLAYER_COUNT, 0);
|
throw NetException(__FILE__, __LINE__, ERR_NET_INVALID_PLAYER_COUNT, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Resize the packet so that the data fits in.
|
// Resize the packet so that the data fits in.
|
||||||
Resize((u_int16_t)
|
Resize((u_int16_t)
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ ServerGameThread::RemoveAllSessions()
|
|||||||
{
|
{
|
||||||
SessionWrapper tmpSession = m_sessionQueue.front();
|
SessionWrapper tmpSession = m_sessionQueue.front();
|
||||||
m_sessionQueue.pop_front();
|
m_sessionQueue.pop_front();
|
||||||
|
LOG_VERBOSE("Game closing, forcing removal of session #" << tmpSession.sessionData->GetId() << ".");
|
||||||
lobbyThread.RemoveSessionFromGame(tmpSession);
|
lobbyThread.RemoveSessionFromGame(tmpSession);
|
||||||
}
|
}
|
||||||
GetSessionManager().ForEach(boost::bind(&ServerLobbyThread::RemoveSessionFromGame, boost::ref(lobbyThread), _1));
|
GetSessionManager().ForEach(boost::bind(&ServerLobbyThread::RemoveSessionFromGame, boost::ref(lobbyThread), _1));
|
||||||
|
|||||||
Reference in New Issue
Block a user