# HG changeset patch # User Teemu Piippo # Date 1469266343 -10800 # Node ID 96ffd13c08a261717e860126d33ac5eb4826b71d # Parent e3794f48a58983a9df4420499cd13d22d01ed627 Reduce delta to protocol5 branch by importing the change to RCONSessoin::handlePacket's signature diff -r e3794f48a589 -r 96ffd13c08a2 sources/network/rconsession.cpp --- a/sources/network/rconsession.cpp Sat Jul 23 12:23:07 2016 +0300 +++ b/sources/network/rconsession.cpp Sat Jul 23 12:32:23 2016 +0300 @@ -112,17 +112,18 @@ } for (Datagram datagram; m_socket.read(datagram);) - handlePacket(datagram); + { + // Only process packets that originate from the game server. + if (datagram.address == m_address) + handlePacket(datagram.message); + } } // ------------------------------------------------------------------------------------------------- // -void RCONSession::handlePacket(Datagram& datagram) +void RCONSession::handlePacket(ByteArray& message) { - if (datagram.address != m_address) - return; - - Bytestream stream(datagram.message); + Bytestream stream(message); try { diff -r e3794f48a589 -r 96ffd13c08a2 sources/network/rconsession.h --- a/sources/network/rconsession.h Sat Jul 23 12:23:07 2016 +0300 +++ b/sources/network/rconsession.h Sat Jul 23 12:32:23 2016 +0300 @@ -103,7 +103,7 @@ const String& getLevel() const; UDPSocket* getSocket(); RCONSessionState getState() const; - void handlePacket(Datagram& datagram); + void handlePacket(ByteArray& message); bool isActive() const; void processServerUpdates(Bytestream& packet); void requestTabCompletion(const String& part);