From: Scott MacVicar Date: Fri, 16 Oct 2009 02:10:52 +0000 (+0000) Subject: Part fix for bug #49224 X-Git-Tag: php-5.4.0alpha1~191^2~2504 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ad09c4d16bf11f81dd22ab07f8275b950eb49c4;p=php Part fix for bug #49224 --- 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