diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2016-03-03 16:31:01 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2016-03-03 16:31:01 -0500 |
commit | 69401a64384afdf839c46080e84809ae8c90a603 (patch) | |
tree | 0a2180699820311cb2208702a8e1a706ec7f9c7e | |
parent | e29049161a218ca1585fe3ca6e0c61ce83e79fc0 (diff) | |
download | sdl_ios-69401a64384afdf839c46080e84809ae8c90a603.tar.gz |
Revert "Added ability for SDLTCPTransport to check hostname before we attempt to connect, and correctly errors out if the hostname is invalid/unreachable."
This reverts commit dbe8d8da4aa319b2d62d1eecbb0794d072066d0c.
Conflicts:
SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m
-rw-r--r-- | SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m index b84ed9e64..54eb63423 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m @@ -14,7 +14,6 @@ #import <sys/wait.h> #import <netinet/in.h> #import <netdb.h> -#import <SystemConfiguration/SystemConfiguration.h> // C function forward declarations. @@ -129,17 +128,6 @@ int call_socket(const char *hostname, const char *port) { hostname = (const char *)&localhost; } - // 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 stringWithUTF8String:hostname]; - NSString* error = [NSString stringWithFormat:@"Invalid IP address of %@. Cancelling connection.", hostnameString]; - [SDLDebugTool logInfo:error withType:SDLDebugType_Transport_TCP]; - return (-1); - } else { - CFRelease(reachability); - } - //getaddrinfo setup if ((status = getaddrinfo(hostname, port, &hints, &servinfo)) != 0) { fprintf(stderr, "getaddrinfo error: %s\n", gai_strerror(status)); |