From c18004e67869a9de88d9f8038a7a1957f20f63fc Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 11 Sep 2009 15:04:47 +0200 Subject: Net: Add support for packets >64K Need too secure this against DoS... --- src/Net/Connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Net/Connection.cpp') diff --git a/src/Net/Connection.cpp b/src/Net/Connection.cpp index 80a7163..f1beb35 100644 --- a/src/Net/Connection.cpp +++ b/src/Net/Connection.cpp @@ -96,7 +96,7 @@ void Connection::handleHeaderReceive(const boost::shared_array & enterReceiveLoop(); } else { - rawReceive(ntohs(header.length), boost::bind(&Connection::handleDataReceive, thisPtr.lock(), _1)); + rawReceive(ntohl(header.length), boost::bind(&Connection::handleDataReceive, thisPtr.lock(), _1)); } } @@ -104,7 +104,7 @@ void Connection::handleDataReceive(const boost::shared_array &da { boost::upgrade_lock lock(connectionLock); - receiveSignal.emit(boost::shared_ptr(new Packet(ntohs(header.requestId), data.get(), ntohs(header.length)))); + receiveSignal.emit(boost::shared_ptr(new Packet(ntohs(header.requestId), data.get(), ntohl(header.length)))); } enterReceiveLoop(); -- cgit v1.2.3