summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2016-02-29 07:58:11 -0800
committerMuller, Alexander (A.) <amulle19@ford.com>2016-02-29 07:58:11 -0800
commitec95da853bf543a251eeb6acc510ecc56b600e27 (patch)
tree863bcec21579915d67fcf3d383416155abbb6d2f
parent3b0983e5464a08e78b5d9fb145858df85af71c3c (diff)
downloadsdl_ios-hotfix/issue_362.tar.gz
Update string instantiation to use NSString's helper class function.hotfix/issue_362
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m
index ff467cc5e..b84ed9e64 100644
--- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m
@@ -132,7 +132,7 @@ int call_socket(const char *hostname, const char *port) {
// check if hostname address is valid before we attempt to connect.
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)hostname);
if (reachability == NULL) {
- NSString* hostnameString = [NSString stringWithCString:hostname encoding:NSUTF8StringEncoding];
+ NSString* hostnameString = [NSString stringWithUTF8String:hostname];
NSString* error = [NSString stringWithFormat:@"Invalid IP address of %@. Cancelling connection.", hostnameString];
[SDLDebugTool logInfo:error withType:SDLDebugType_Transport_TCP];
return (-1);