summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-03-03 16:31:01 -0500
committerJoel Fischer <joeljfischer@gmail.com>2016-03-03 16:31:01 -0500
commit69401a64384afdf839c46080e84809ae8c90a603 (patch)
tree0a2180699820311cb2208702a8e1a706ec7f9c7e
parente29049161a218ca1585fe3ca6e0c61ce83e79fc0 (diff)
downloadsdl_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.m12
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));