diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2019-04-05 11:55:04 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2019-04-05 11:55:04 -0400 |
commit | 1413994f46b707289368af26e7e82d76221d1d81 (patch) | |
tree | a8d07ccdbbdad473bf315beb1f7b28d9da5c3b60 | |
parent | a0aab72c7802e2d488f6887137a993fb73007dfa (diff) | |
download | sdl_ios-bugfix/issue_1214_max_correlation_id.tar.gz |
Update `lastCorrelationId` to be Int32 instead of UInt16bugfix/issue_1214_max_correlation_id
* Updated correlation id to got to INT32_MAX
* Updated `lastCorrelationId` to be hidden on `SDLLifecycleManager`
-rw-r--r-- | SmartDeviceLink/SDLLifecycleManager.h | 1 | ||||
-rw-r--r-- | SmartDeviceLink/SDLLifecycleManager.m | 3 | ||||
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/SmartDeviceLink/SDLLifecycleManager.h b/SmartDeviceLink/SDLLifecycleManager.h index dfb8c5140..067cd6af5 100644 --- a/SmartDeviceLink/SDLLifecycleManager.h +++ b/SmartDeviceLink/SDLLifecycleManager.h @@ -82,7 +82,6 @@ typedef void (^SDLManagerReadyBlock)(BOOL success, NSError *_Nullable error); @property (strong, nonatomic, nullable) SDLProxy *proxy; #pragma clang diagnostic pop -@property (assign, nonatomic) UInt16 lastCorrelationId; @property (copy, nonatomic, readonly) SDLLifecycleState *lifecycleState; @property (copy, nonatomic, nullable) SDLHMILevel hmiLevel; @property (copy, nonatomic, nullable) SDLAudioStreamingState audioStreamingState; diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m index e40159038..61caf1783 100644 --- a/SmartDeviceLink/SDLLifecycleManager.m +++ b/SmartDeviceLink/SDLLifecycleManager.m @@ -87,6 +87,7 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; @property (strong, nonatomic, nullable) SDLSecondaryTransportManager *secondaryTransportManager; @property (copy, nonatomic) SDLManagerReadyBlock readyHandler; @property (copy, nonatomic) dispatch_queue_t lifecycleQueue; +@property (assign, nonatomic) int32_t lastCorrelationId; @end @@ -651,7 +652,7 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; #pragma mark Helper Methods - (NSNumber<SDLInt> *)sdl_getNextCorrelationId { - if (self.lastCorrelationId == UINT16_MAX) { + if (self.lastCorrelationId == INT32_MAX) { self.lastCorrelationId = 0; } diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m index 728dcc99f..01ed3b78f 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m @@ -46,6 +46,7 @@ @interface SDLLifecycleManager () // this private property is used for testing @property (copy, nonatomic) dispatch_queue_t lifecycleQueue; +@property (assign, nonatomic) int32_t lastCorrelationId; @end QuickConfigurationBegin(SendingRPCsConfiguration) |