summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Beharry <justin.beharry@livio.io>2022-08-31 12:35:04 -0400
committerJustin Beharry <justin.beharry@livio.io>2022-08-31 12:35:04 -0400
commit2c979b8fbf9fd5ce7b40e5b85c48f72db669d052 (patch)
tree648e378e007e509825bd43d38176957447a73b5e
parent1e4d1204676d455c35d709f80f91ae5b8ca102b9 (diff)
downloadsdl_ios-2c979b8fbf9fd5ce7b40e5b85c48f72db669d052.tar.gz
Add bytesInPayload to hash
-rw-r--r--SmartDeviceLink/private/SDLProtocolHeader.m3
-rw-r--r--SmartDeviceLink/private/SDLV2ProtocolHeader.m2
2 files changed, 3 insertions, 2 deletions
diff --git a/SmartDeviceLink/private/SDLProtocolHeader.m b/SmartDeviceLink/private/SDLProtocolHeader.m
index dd2525c47..89e544d30 100644
--- a/SmartDeviceLink/private/SDLProtocolHeader.m
+++ b/SmartDeviceLink/private/SDLProtocolHeader.m
@@ -49,7 +49,8 @@ NS_ASSUME_NONNULL_BEGIN
^ NSUIntRotateCell(self.encrypted, NSUIntBitCell / 4)
^ NSUIntRotateCell(self.frameType, NSUIntBitCell / 5)
^ NSUIntRotateCell(self.frameData, NSUIntBitCell / 6)
- ^ NSUIntRotateCell(self.sessionID, NSUIntBitCell / 7);
+ ^ NSUIntRotateCell(self.sessionID, NSUIntBitCell / 7)
+ ^ NSUIntRotateCell(self.bytesInPayload, NSUIntBitCell / 8);
}
+ (__kindof SDLProtocolHeader *)headerForVersion:(UInt8)version {
diff --git a/SmartDeviceLink/private/SDLV2ProtocolHeader.m b/SmartDeviceLink/private/SDLV2ProtocolHeader.m
index b85dcd399..7f47f445c 100644
--- a/SmartDeviceLink/private/SDLV2ProtocolHeader.m
+++ b/SmartDeviceLink/private/SDLV2ProtocolHeader.m
@@ -126,7 +126,7 @@ const int ProtocolV2HeaderByteSize = 12;
}
- (NSUInteger)hash {
- return [super hash] ^ NSUIntRotateCell(self.messageID, NSUIntBitCell / 8);
+ return [super hash] ^ NSUIntRotateCell(self.messageID, NSUIntBitCell / 9);
}
- (BOOL)isEqual:(SDLV2ProtocolHeader *)object {