diff options
author | sapier <sapier at gmx dot net> | 2012-02-04 12:41:25 +0100 |
---|---|---|
committer | sapier <sapier at gmx dot net> | 2012-02-04 12:41:25 +0100 |
commit | 77df09540c4d7eadef760779e123af88a48aafaa (patch) | |
tree | febf1009328d30c31a14a1a1ca1600e99b4c3e6b /src/connection.cpp | |
parent | 3454e6779337d8523ae76c7fa16eb8c565aa2381 (diff) | |
parent | a1eb2836c0764829ebad1462432bb3c5f32750df (diff) | |
download | minetest-77df09540c4d7eadef760779e123af88a48aafaa.tar.xz |
Merge remote branch 'upstream/master' into sapier_experimental
Conflicts:
src/scriptapi.cpp
Diffstat (limited to 'src/connection.cpp')
-rw-r--r-- | src/connection.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/connection.cpp b/src/connection.cpp index b9c5d2ac8..8f308c99f 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -666,7 +666,7 @@ void Connection::send(float dtime) // Receive packets from the network and buffers and create ConnectionEvents void Connection::receive() { - u32 datasize = 100000; + u32 datasize = m_max_packet_size * 2; // Double it just to be safe // TODO: We can not know how many layers of header there are. // For now, just assume there are no other than the base headers. u32 packet_maxsize = datasize + BASE_HEADER_SIZE; @@ -854,10 +854,6 @@ void Connection::receive() dout_con<<"ProcessPacket returned data of size " <<resultdata.getSize()<<std::endl; - if(datasize < resultdata.getSize()) - throw InvalidIncomingDataException - ("Buffer too small for received data"); - ConnectionEvent e; e.dataReceived(peer_id, resultdata); putEvent(e); |