fix check for writing of packet header

This commit is contained in:
Stephen Birarda 2015-07-15 13:17:32 -07:00
parent e90ace6231
commit a79c8ab193
2 changed files with 5 additions and 2 deletions

View file

@ -221,7 +221,10 @@ void writePacketHeader(const NLPacket& packet, const QUuid& sessionUUID = QUuid(
if (!NON_SOURCED_PACKETS.contains(packet.getType())) {
const_cast<NLPacket&>(packet).writeSourceID(sessionUUID);
}
if (!connectionSecret.isNull() && !NON_VERIFIED_PACKETS.contains(packet.getType())) {
if (!connectionSecret.isNull()
&& !NON_SOURCED_PACKETS.contains(packet.getType())
&& !NON_VERIFIED_PACKETS.contains(packet.getType())) {
const_cast<NLPacket&>(packet).writeVerificationHash(packet.payloadHashWithConnectionUUID(connectionSecret));
}
}

View file

@ -284,7 +284,7 @@ void NodeList::sendDomainServerCheckIn() {
flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SendDSCheckIn);
if (!isUsingDTLS) {
if (!isUsingDTLS) {
sendPacket(std::move(domainPacket), _domainHandler.getSockAddr());
}