diff options
author | Justin Beharry <justin.beharry@livio.io> | 2022-08-31 12:35:04 -0400 |
---|---|---|
committer | Justin Beharry <justin.beharry@livio.io> | 2022-08-31 12:35:04 -0400 |
commit | 2c979b8fbf9fd5ce7b40e5b85c48f72db669d052 (patch) | |
tree | 648e378e007e509825bd43d38176957447a73b5e | |
parent | 1e4d1204676d455c35d709f80f91ae5b8ca102b9 (diff) | |
download | sdl_ios-2c979b8fbf9fd5ce7b40e5b85c48f72db669d052.tar.gz |
Add bytesInPayload to hash
-rw-r--r-- | SmartDeviceLink/private/SDLProtocolHeader.m | 3 | ||||
-rw-r--r-- | SmartDeviceLink/private/SDLV2ProtocolHeader.m | 2 |
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 { |