summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Net/Connection.cpp')
-rw-r--r--src/Net/Connection.cpp4
1 files changed, 2 insertions, 2 deletions
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<boost::uint8_t> &
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<boost::uint8_t> &da
{
boost::upgrade_lock<boost::shared_mutex> lock(connectionLock);
- receiveSignal.emit(boost::shared_ptr<Packet>(new Packet(ntohs(header.requestId), data.get(), ntohs(header.length))));
+ receiveSignal.emit(boost::shared_ptr<Packet>(new Packet(ntohs(header.requestId), data.get(), ntohl(header.length))));
}
enterReceiveLoop();