summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2019-05-29 15:00:16 -0400
committerNicoleYarroch <nicole@livio.io>2019-05-29 15:00:16 -0400
commit2e12a55ceaeeb22bbcca9e8e5c25629401fa15ce (patch)
tree5e0767d082eb68c96d142e81d7db2ee8f5db3a90
parent0047bf7fd85297cccd52eddc91cbde6530958ad4 (diff)
downloadsdl_ios-2e12a55ceaeeb22bbcca9e8e5c25629401fa15ce.tar.gz
Added more SDL logs
Added more SDL logs for debugging start session timeouts
-rw-r--r--SmartDeviceLink/SDLIAPDataSession.m2
-rw-r--r--SmartDeviceLink/SDLIAPTransport.m5
2 files changed, 6 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLIAPDataSession.m b/SmartDeviceLink/SDLIAPDataSession.m
index 3d42cb5ef..37188b532 100644
--- a/SmartDeviceLink/SDLIAPDataSession.m
+++ b/SmartDeviceLink/SDLIAPDataSession.m
@@ -169,6 +169,8 @@ NS_ASSUME_NONNULL_BEGIN
NSMutableData *remainder = [self.sendDataQueue frontBuffer];
if (remainder != nil && ostream.streamStatus == NSStreamStatusOpen) {
+ SDLLogV(@"Writing to the data session's output stream");
+
NSUInteger bytesRemaining = remainder.length;
NSInteger bytesWritten = [ostream write:remainder.bytes maxLength:bytesRemaining];
if (bytesWritten < 0) {
diff --git a/SmartDeviceLink/SDLIAPTransport.m b/SmartDeviceLink/SDLIAPTransport.m
index 0e0194c2b..999518d4d 100644
--- a/SmartDeviceLink/SDLIAPTransport.m
+++ b/SmartDeviceLink/SDLIAPTransport.m
@@ -262,7 +262,10 @@ int const CreateSessionRetries = 3;
* @param data The data to be sent to Core
*/
- (void)sendData:(NSData *)data {
- if (!self.dataSession.sessionInProgress) { return; }
+ if (!self.dataSession.sessionInProgress) {
+ SDLLogW(@"Attempting to send data to Core but there is no data session in progress");
+ return;
+ }
[self.dataSession sendData:data];
}