scottmac Fri, 16 Oct 2009 02:10:52 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=289691
Log: Part fix for bug #49224 Bug: http://bugs.php.net/49224 (Assigned) Segmentation fault Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/dns.c U php/php-src/branches/PHP_5_3/ext/standard/php_dns.h U php/php-src/trunk/ext/standard/dns.c U php/php-src/trunk/ext/standard/php_dns.h Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2009-10-16 01:56:36 UTC (rev 289690) +++ php/php-src/branches/PHP_5_3/NEWS 2009-10-16 02:10:52 UTC (rev 289691) @@ -40,6 +40,8 @@ cannot be set"). (Felipe) - Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after fclose). (Ilia) +- Fixed bug #49224 (Compile error due to old DNS functions on AIX systems). + (Scott) - Fixed bug #48805 (IPv6 socket transport is not working). (Ilia) - Fixed PECL bug #16842 (oci_error return false when NO_DATA_FOUND is raised). (Chris Jones) Modified: php/php-src/branches/PHP_5_3/ext/standard/dns.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/dns.c 2009-10-16 01:56:36 UTC (rev 289690) +++ php/php-src/branches/PHP_5_3/ext/standard/dns.c 2009-10-16 02:10:52 UTC (rev 289691) @@ -810,14 +810,8 @@ 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; Modified: php/php-src/branches/PHP_5_3/ext/standard/php_dns.h =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/php_dns.h 2009-10-16 01:56:36 UTC (rev 289690) +++ php/php-src/branches/PHP_5_3/ext/standard/php_dns.h 2009-10-16 02:10:52 UTC (rev 289691) @@ -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) \ @@ -37,15 +35,11 @@ #define php_dns_free_handle(res) \ 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 Modified: php/php-src/trunk/ext/standard/dns.c =================================================================== --- php/php-src/trunk/ext/standard/dns.c 2009-10-16 01:56:36 UTC (rev 289690) +++ php/php-src/trunk/ext/standard/dns.c 2009-10-16 02:10:52 UTC (rev 289691) @@ -810,14 +810,8 @@ 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; Modified: php/php-src/trunk/ext/standard/php_dns.h =================================================================== --- php/php-src/trunk/ext/standard/php_dns.h 2009-10-16 01:56:36 UTC (rev 289690) +++ php/php-src/trunk/ext/standard/php_dns.h 2009-10-16 02:10:52 UTC (rev 289691) @@ -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
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php