summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Elias <francois.elias@livio.io>2021-10-25 15:51:51 -0400
committerFrank Elias <francois.elias@livio.io>2021-10-25 15:51:51 -0400
commitb2185eade15e045ad042a0d1742516155cd7d4ac (patch)
treeb7ae7ab1482ad6b99bcf52ff2f2f76fb559918cc
parent7704c96d452ae4769b29da639eb6cf1a5278c713 (diff)
downloadsdl_ios-bugfix/issue-2049-security-error-notifications-are-missing-error-description-and-code.tar.gz
-rw-r--r--SmartDeviceLink/private/SDLProtocol.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/SmartDeviceLink/private/SDLProtocol.m b/SmartDeviceLink/private/SDLProtocol.m
index 88b9615e4..e189df839 100644
--- a/SmartDeviceLink/private/SDLProtocol.m
+++ b/SmartDeviceLink/private/SDLProtocol.m
@@ -869,8 +869,8 @@ NS_ASSUME_NONNULL_BEGIN
// For a control service packet, we need a binary header with a function ID corresponding to what type of packet we're sending.
UInt8 errorCode = 0xFF;
- NSDictionary *jsonDictionary = @{@"id" : @0xFF, @"text" : [SDLSecurityQueryError convertErrorIdToStringEnum:@(errorCode)]};
- NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonDictionary options:NSJSONWritingPrettyPrinted error:nil];
+ NSDictionary *jsonDictionary = @{@"id" : @(errorCode), @"text" : [SDLSecurityQueryError convertErrorIdToStringEnum:@(errorCode)]};
+ NSData *jsonData = [NSJSONSerialization dataWithJSONObject:jsonDictionary options:kNilOptions error:nil];
NSData *binaryDataPayload = [NSData dataWithBytes:&errorCode length:sizeof(errorCode)];
SDLSecurityQueryPayload *serverTLSPayload = [[SDLSecurityQueryPayload alloc] initWithQueryType:SDLSecurityQueryTypeNotification queryID:SDLSecurityQueryIdSendInternalError sequenceNumber:0x00 jsonData:jsonData binaryData:binaryDataPayload];