summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2016-07-28 18:07:44 -0700
committerMuller, Alexander (A.) <amulle19@ford.com>2016-07-28 18:07:44 -0700
commit4e39844a110224bbf97ffbf8a554de61cfd51f2e (patch)
tree9a45ddac9d164bf4ec9a31bbd40a360359ac5289
parent76e57b7943c792105d8a20175f83fbc19935a3ac (diff)
downloadsdl_ios-4e39844a110224bbf97ffbf8a554de61cfd51f2e.tar.gz
Fixed issue with starting audio streaming using incorrect completion handler resulting in crash.
-rw-r--r--SmartDeviceLink/SDLStreamingMediaManager.h2
-rw-r--r--SmartDeviceLink/SDLStreamingMediaManager.m6
2 files changed, 4 insertions, 4 deletions
diff --git a/SmartDeviceLink/SDLStreamingMediaManager.h b/SmartDeviceLink/SDLStreamingMediaManager.h
index 8b1f21803..776e39fa4 100644
--- a/SmartDeviceLink/SDLStreamingMediaManager.h
+++ b/SmartDeviceLink/SDLStreamingMediaManager.h
@@ -89,7 +89,7 @@ typedef void (^SDLStreamingEncryptionStartBlock)(BOOL success, BOOL encryption,
- (void)startAudioStreamingWithStartBlock:(SDLStreamingStartBlock)startBlock;
// TODO: Documentation
-- (void)startAudioStreamingWithTLS:(SDLEncryptionFlag)encryptionFlag startBlock:(SDLStreamingStartBlock)startBlock;
+- (void)startAudioStreamingWithTLS:(SDLEncryptionFlag)encryptionFlag startBlock:(SDLStreamingEncryptionStartBlock)startBlock;
/**
* This method will stop a running audio session if there is one running.
diff --git a/SmartDeviceLink/SDLStreamingMediaManager.m b/SmartDeviceLink/SDLStreamingMediaManager.m
index f99ca1762..5f890d109 100644
--- a/SmartDeviceLink/SDLStreamingMediaManager.m
+++ b/SmartDeviceLink/SDLStreamingMediaManager.m
@@ -116,12 +116,12 @@ NS_ASSUME_NONNULL_BEGIN
- (void)startAudioStreamingWithStartBlock:(SDLStreamingStartBlock)startBlock {
[self startAudioStreamingWithTLS:SDLEncryptionFlagNone
- startBlock:^(BOOL success, NSError *_Nullable error) {
+ startBlock:^(BOOL success, BOOL encryption, NSError *_Nullable error) {
startBlock(success, error);
}];
}
-- (void)startAudioStreamingWithTLS:(SDLEncryptionFlag)encryptionFlag startBlock:(SDLStreamingStartBlock)startBlock {
+- (void)startAudioStreamingWithTLS:(SDLEncryptionFlag)encryptionFlag startBlock:(SDLStreamingEncryptionStartBlock)startBlock {
self.audioStartBlock = [startBlock copy];
self.encryptAudioSession = (encryptionFlag == SDLEncryptionFlagAuthenticateAndEncrypt ? YES : NO);
@@ -130,7 +130,7 @@ NS_ASSUME_NONNULL_BEGIN
[self.protocol startSecureServiceWithType:SDLServiceType_Audio
completionHandler:^(BOOL success, NSError *error) {
typeof(weakSelf) strongSelf = weakSelf;
- // If this passes, we will get an ACK or NACK, so those methods will handle calling the video block
+ // If this passes, we will get an ACK or NACK, so those methods will handle calling the audio block
if (!success) {
strongSelf.audioStartBlock(NO, NO, error);
strongSelf.audioStartBlock = nil;