[Server] Some fixes for MasterClient

coverity_scan^2
Koncord 8 years ago
parent d9f5dfe65c
commit aed0651dc2

@ -164,7 +164,7 @@ void MasterClient::Update()
RakSleep(timeout); RakSleep(timeout);
players = mwmp::Networking::get().numberOfConnections(); players = Players::getPlayers()->size();
response = Send(hostname, modname, maxPlayers, update, players); response = Send(hostname, modname, maxPlayers, update, players);
update = true; update = true;
} }

@ -828,7 +828,8 @@ int Networking::mainLoop()
bs.Write(RakNet::RakString(player.second->npc.mName.c_str())); bs.Write(RakNet::RakString(player.second->npc.mName.c_str()));
bs.Write(0); // plugins bs.Write(0); // plugins
peer->Send(&bs, HIGH_PRIORITY, RELIABLE_ORDERED, 0, packet->systemAddress, false); peer->Send(&bs, HIGH_PRIORITY, RELIABLE_ORDERED, 0, packet->systemAddress, false);
break; peer->CloseConnection(packet->guid, false);
break;
} }
default: default:
update(packet); update(packet);

@ -120,11 +120,6 @@ std::string loadSettings (Settings::Manager & settings)
return settingspath; return settingspath;
} }
void queryThread(MasterClient *mclient)
{
mclient->Update();
}
class Tee : public boost::iostreams::sink class Tee : public boost::iostreams::sink
{ {
public: public:

Loading…
Cancel
Save