mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 03:13:09 +02:00
fix for write of sourceID and verificationHash
This commit is contained in:
parent
b68c7fd92a
commit
d938f31fab
1 changed files with 2 additions and 2 deletions
|
@ -233,7 +233,7 @@ void NLPacket::readSourceID() {
|
|||
void NLPacket::writeSourceID(const QUuid& sourceID) {
|
||||
Q_ASSERT(!NON_SOURCED_PACKETS.contains(_type));
|
||||
|
||||
auto offset = Packet::localHeaderSize();
|
||||
auto offset = Packet::localHeaderSize() + sizeof(PacketType) + sizeof(PacketVersion);
|
||||
memcpy(_packet.get() + offset, sourceID.toRfc4122().constData(), NUM_BYTES_RFC4122_UUID);
|
||||
|
||||
_sourceID = sourceID;
|
||||
|
@ -242,7 +242,7 @@ void NLPacket::writeSourceID(const QUuid& sourceID) {
|
|||
void NLPacket::writeVerificationHashGivenSecret(const QUuid& connectionSecret) {
|
||||
Q_ASSERT(!NON_SOURCED_PACKETS.contains(_type) && !NON_VERIFIED_PACKETS.contains(_type));
|
||||
|
||||
auto offset = Packet::localHeaderSize() + NUM_BYTES_RFC4122_UUID;
|
||||
auto offset = Packet::localHeaderSize() + sizeof(PacketType) + sizeof(PacketVersion) + NUM_BYTES_RFC4122_UUID;
|
||||
QByteArray verificationHash = hashForPacketAndSecret(*this, connectionSecret);
|
||||
|
||||
memcpy(_packet.get() + offset, verificationHash.data(), verificationHash.size());
|
||||
|
|
Loading…
Reference in a new issue