From 0ad09c4d16bf11f81dd22ab07f8275b950eb49c4 Mon Sep 17 00:00:00 2001 From: Scott MacVicar Date: Fri, 16 Oct 2009 02:10:52 +0000 Subject: [PATCH] Part fix for bug #49224 --- ext/standard/dns.c | 8 +------- ext/standard/php_dns.h | 7 ------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 08d2ae7970..a93ae40ce8 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -810,14 +810,8 @@ PHP_FUNCTION(dns_get_record) n = php_dns_search(handle, hostname, C_IN, type_to_fetch, answer.qb2, sizeof answer); if (n < 0) { - if (php_dns_errno(handle) == NO_DATA) { - php_dns_free_handle(handle); - continue; - } - php_dns_free_handle(handle); - zval_dtor(return_value); - RETURN_FALSE; + continue; } cp = answer.qb2 + HFIXEDSZ; diff --git a/ext/standard/php_dns.h b/ext/standard/php_dns.h index 7e80004071..177a7f4584 100644 --- a/ext/standard/php_dns.h +++ b/ext/standard/php_dns.h @@ -28,8 +28,6 @@ ((int)dns_search(res, dname, class, type, answer, anslen, (struct sockaddr *)&from, &fromsize)) #define php_dns_free_handle(res) \ dns_free(res) -#define php_dns_errno(_res) \ - (NO_DATA) #elif defined(HAVE_RES_NSEARCH) #define php_dns_search(res, dname, class, type, answer, anslen) \ @@ -38,15 +36,10 @@ res_nclose(res); \ php_dns_free_res(*res) -#define php_dns_errno(res) \ - (res->res_h_errno) - #elif defined(HAVE_RES_SEARCH) #define php_dns_search(res, dname, class, type, answer, anslen) \ res_search(dname, class, type, answer, anslen) #define php_dns_free_handle(res) /* noop */ -#define php_dns_errno(res) \ - (_res.res_h_errno) #endif -- 2.50.1