first adjustment in NLPacket after type is known

This commit is contained in:
Stephen Birarda 2015-07-23 16:59:08 -07:00
parent 069dff0793
commit b68c7fd92a
2 changed files with 2 additions and 3 deletions

View file

@ -580,7 +580,6 @@ void DomainServer::processConnectRequestPacket(QSharedPointer<NLPacket> packet)
NodeType_t nodeType;
HifiSockAddr publicSockAddr, localSockAddr;
if (packet->getPayloadSize() == 0) {
return;
}

View file

@ -104,11 +104,11 @@ NLPacket::NLPacket(PacketType type, qint64 size, bool isReliable, bool isPartOfM
NLPacket::NLPacket(std::unique_ptr<Packet> packet) :
Packet(std::move(*packet.release()))
{
adjustPayloadStartAndCapacity(_payloadSize > 0);
readType();
readVersion();
readSourceID();
adjustPayloadStartAndCapacity(_payloadSize > 0);
}
NLPacket::NLPacket(const NLPacket& other) : Packet(other) {