summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2019-04-05 11:55:04 -0400
committerJoel Fischer <joeljfischer@gmail.com>2019-04-05 11:55:04 -0400
commit1413994f46b707289368af26e7e82d76221d1d81 (patch)
treea8d07ccdbbdad473bf315beb1f7b28d9da5c3b60
parenta0aab72c7802e2d488f6887137a993fb73007dfa (diff)
downloadsdl_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.h1
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m3
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m1
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)