mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 07:49:13 +02:00
first adjustment in NLPacket after type is known
This commit is contained in:
parent
069dff0793
commit
b68c7fd92a
2 changed files with 2 additions and 3 deletions
|
@ -580,7 +580,6 @@ void DomainServer::processConnectRequestPacket(QSharedPointer<NLPacket> packet)
|
||||||
NodeType_t nodeType;
|
NodeType_t nodeType;
|
||||||
HifiSockAddr publicSockAddr, localSockAddr;
|
HifiSockAddr publicSockAddr, localSockAddr;
|
||||||
|
|
||||||
|
|
||||||
if (packet->getPayloadSize() == 0) {
|
if (packet->getPayloadSize() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,11 +104,11 @@ NLPacket::NLPacket(PacketType type, qint64 size, bool isReliable, bool isPartOfM
|
||||||
NLPacket::NLPacket(std::unique_ptr<Packet> packet) :
|
NLPacket::NLPacket(std::unique_ptr<Packet> packet) :
|
||||||
Packet(std::move(*packet.release()))
|
Packet(std::move(*packet.release()))
|
||||||
{
|
{
|
||||||
adjustPayloadStartAndCapacity(_payloadSize > 0);
|
|
||||||
|
|
||||||
readType();
|
readType();
|
||||||
readVersion();
|
readVersion();
|
||||||
readSourceID();
|
readSourceID();
|
||||||
|
|
||||||
|
adjustPayloadStartAndCapacity(_payloadSize > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
NLPacket::NLPacket(const NLPacket& other) : Packet(other) {
|
NLPacket::NLPacket(const NLPacket& other) : Packet(other) {
|
||||||
|
|
Loading…
Reference in a new issue