 pjlib/include/pj/compat/os_auto.h.in |  2 --
 pjlib/src/pj/addr_resolv_sock.c      | 66 ------------------------------------------------------------------
 2 files changed, 68 deletions(-)

diff --git a/pjlib/include/pj/compat/os_auto.h.in b/pjlib/include/pj/compat/os_auto.h.in
index 159d2bcf0..aef68490b 100644
--- a/pjlib/include/pj/compat/os_auto.h.in
+++ b/pjlib/include/pj/compat/os_auto.h.in
@@ -190,8 +190,6 @@
 #    include "TargetConditionals.h"
 #    if TARGET_OS_IPHONE
 #	include "Availability.h"
-	/* Use CFHost API for pj_getaddrinfo() (see ticket #1246) */
-#	define PJ_GETADDRINFO_USE_CFHOST 1
 #    	ifdef __IPHONE_4_0
  	    /* Is multitasking support available?  (see ticket #1107) */
 #	    define PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT 	1
diff --git a/pjlib/src/pj/addr_resolv_sock.c b/pjlib/src/pj/addr_resolv_sock.c
index 54646007c..4b09a989e 100644
--- a/pjlib/src/pj/addr_resolv_sock.c
+++ b/pjlib/src/pj/addr_resolv_sock.c
@@ -24,11 +24,6 @@
 #include <pj/ip_helper.h>
 #include <pj/compat/socket.h>
 
-#if defined(PJ_GETADDRINFO_USE_CFHOST) && PJ_GETADDRINFO_USE_CFHOST!=0
-#   include <CoreFoundation/CFString.h>
-#   include <CFNetwork/CFHost.h>
-#endif
-
 PJ_DEF(pj_status_t) pj_gethostbyname(const pj_str_t *hostname, pj_hostent *phe)
 {
     struct hostent *he;
@@ -68,14 +63,8 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename,
     char nodecopy[PJ_MAX_HOSTNAME];
     pj_bool_t has_addr = PJ_FALSE;
     unsigned i;
-#if defined(PJ_GETADDRINFO_USE_CFHOST) && PJ_GETADDRINFO_USE_CFHOST!=0
-    CFStringRef hostname;
-    CFHostRef hostRef;
-    pj_status_t status = PJ_SUCCESS;
-#else
     int rc;
     struct addrinfo hint, *res, *orig_res;
-#endif
 
     PJ_ASSERT_RETURN(nodename && count && *count && ai, PJ_EINVAL);
     PJ_ASSERT_RETURN(nodename->ptr && nodename->slen, PJ_EINVAL);
@@ -121,60 +110,6 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename,
     pj_memcpy(nodecopy, nodename->ptr, nodename->slen);
     nodecopy[nodename->slen] = '\0';
 
-#if defined(PJ_GETADDRINFO_USE_CFHOST) && PJ_GETADDRINFO_USE_CFHOST!=0
-    hostname =  CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, nodecopy,
-						kCFStringEncodingASCII,
-						kCFAllocatorNull);
-    hostRef = CFHostCreateWithName(kCFAllocatorDefault, hostname);
-    if (CFHostStartInfoResolution(hostRef, kCFHostAddresses, nil)) {
-	CFArrayRef addrRef = CFHostGetAddressing(hostRef, nil);
-	i = 0;
-	if (addrRef != nil) {
-	    CFIndex idx, naddr;
-	    
-	    naddr = CFArrayGetCount(addrRef);
-	    for (idx = 0; idx < naddr && i < *count; idx++) {
-		struct sockaddr *addr;
-		size_t addr_size;
-		
-		addr = (struct sockaddr *)
-		       CFDataGetBytePtr(CFArrayGetValueAtIndex(addrRef, idx));
-		/* This should not happen. */
-		pj_assert(addr);
-		
-		/* Ignore unwanted address families */
-		if (af!=PJ_AF_UNSPEC && addr->sa_family != af)
-		    continue;
-
-		/* Store canonical name */
-		pj_ansi_strcpy(ai[i].ai_canonname, nodecopy);
-		
-		/* Store address */
-		addr_size = sizeof(*addr);
-		if (addr->sa_family == PJ_AF_INET6) {
-		    addr_size = addr->sa_len;
-		}
-		PJ_ASSERT_ON_FAIL(addr_size <= sizeof(pj_sockaddr), continue);
-		pj_memcpy(&ai[i].ai_addr, addr, addr_size);
-		PJ_SOCKADDR_RESET_LEN(&ai[i].ai_addr);
-		
-		i++;
-	    }
-	}
-	
-	*count = i;
-	if (*count == 0)
-	    status = PJ_ERESOLVE;
-
-    } else {
-	status = PJ_ERESOLVE;
-    }
-    
-    CFRelease(hostRef);
-    CFRelease(hostname);
-    
-    return status;
-#else
     /* Call getaddrinfo() */
     pj_bzero(&hint, sizeof(hint));
     hint.ai_family = af;
@@ -216,7 +151,6 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename,
 
     /* Done */
     return (*count > 0? PJ_SUCCESS : PJ_ERESOLVE);
-#endif
 
 #else	/* PJ_SOCK_HAS_GETADDRINFO */
     pj_bool_t has_addr = PJ_FALSE;
