aboutsummaryrefslogtreecommitdiff
path: root/src/connection.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2012-01-12 06:10:39 +0100
committerKahrl <kahrl@gmx.net>2012-01-12 06:10:39 +0100
commit6a76c226e10e92c3e3339096f07f8ab065e2098b (patch)
tree396d9083f5f76ebb5ba96df113ba68046c2487df /src/connection.cpp
parent569156b01302ea4ba45d11ff5524b62dbc6a9aa0 (diff)
downloadminetest-6a76c226e10e92c3e3339096f07f8ab065e2098b.tar.xz
The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
Diffstat (limited to 'src/connection.cpp')
-rw-r--r--src/connection.cpp6
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);