diff options
author | Frank Elias <francois.elias@livio.io> | 2020-12-03 09:57:54 -0500 |
---|---|---|
committer | Frank Elias <francois.elias@livio.io> | 2020-12-03 09:57:54 -0500 |
commit | cbef83241904992cf56847cee8de88769c2ec23b (patch) | |
tree | 00375d6aff7002508bed78001cd24731867da472 | |
parent | 54de75005f764bee01a6d20f3c429e741df3da57 (diff) | |
download | sdl_ios-cbef83241904992cf56847cee8de88769c2ec23b.tar.gz |
Comments reviewbugfix/issue-1837-first-StartService-isnt-always-V1
-rw-r--r-- | SmartDeviceLink/private/SDLGlobals.h | 2 | ||||
-rw-r--r-- | SmartDeviceLink/private/SDLGlobals.m | 2 | ||||
-rw-r--r-- | SmartDeviceLink/private/SDLLifecycleProtocolHandler.m | 2 | ||||
-rw-r--r-- | SmartDeviceLinkTests/UtilitiesSpecs/SDLGlobalsSpec.m | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/SmartDeviceLink/private/SDLGlobals.h b/SmartDeviceLink/private/SDLGlobals.h index cebf304a4..eb1969a96 100644 --- a/SmartDeviceLink/private/SDLGlobals.h +++ b/SmartDeviceLink/private/SDLGlobals.h @@ -48,7 +48,7 @@ extern void *const SDLConcurrentQueueName; /// @param block The block to run on the serial sub-queue. + (void)runSyncOnSerialSubQueue:(dispatch_queue_t)queue block:(void (^)(void))block; -- (void)sdl_resetProtocolVersion; +- (void)reset; @end diff --git a/SmartDeviceLink/private/SDLGlobals.m b/SmartDeviceLink/private/SDLGlobals.m index 2387a068c..d99f6230e 100644 --- a/SmartDeviceLink/private/SDLGlobals.m +++ b/SmartDeviceLink/private/SDLGlobals.m @@ -131,7 +131,7 @@ typedef NSNumber *MTUBox; } } -- (void)sdl_resetProtocolVersion { +- (void)reset { _protocolVersion = [[SDLVersion alloc] initWithString:@"1.0.0"]; _maxHeadUnitProtocolVersion = [[SDLVersion alloc] initWithString:@"0.0.0"]; _rpcVersion = [[SDLVersion alloc] initWithString:@"1.0.0"]; diff --git a/SmartDeviceLink/private/SDLLifecycleProtocolHandler.m b/SmartDeviceLink/private/SDLLifecycleProtocolHandler.m index af059db21..e415af391 100644 --- a/SmartDeviceLink/private/SDLLifecycleProtocolHandler.m +++ b/SmartDeviceLink/private/SDLLifecycleProtocolHandler.m @@ -92,7 +92,7 @@ NS_ASSUME_NONNULL_BEGIN /// Called when the transport is closed. - (void)protocolDidClose:(SDLProtocol *)protocol { if (self.protocol != protocol) { return; } - [[SDLGlobals sharedGlobals] sdl_resetProtocolVersion]; + [[SDLGlobals sharedGlobals] reset]; SDLLogW(@"Transport disconnected"); [self.notificationDispatcher postNotificationName:SDLTransportDidDisconnect infoObject:nil]; diff --git a/SmartDeviceLinkTests/UtilitiesSpecs/SDLGlobalsSpec.m b/SmartDeviceLinkTests/UtilitiesSpecs/SDLGlobalsSpec.m index 964df337d..379b269e8 100644 --- a/SmartDeviceLinkTests/UtilitiesSpecs/SDLGlobalsSpec.m +++ b/SmartDeviceLinkTests/UtilitiesSpecs/SDLGlobalsSpec.m @@ -43,7 +43,7 @@ describe(@"The SDLGlobals class", ^{ describe(@"test values after calling sdl_resetProtocolVersion", ^{ beforeEach(^{ - [testGlobals sdl_resetProtocolVersion]; + [testGlobals reset]; }); it(@"should return should properly set values", ^{ |