pajoye                                   Mon, 06 Sep 2010 10:57:42 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=303069

Log:
- fix bug #52260, catch all DNS not found error

Bug: http://bugs.php.net/52260 (Assigned) Windows implementation of 
dns_get_record fails with non-existing domain
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c
    U   php/php-src/trunk/ext/standard/dns_win32.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2010-09-06 10:39:26 UTC (rev 303068)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-09-06 10:57:42 UTC (rev 303069)
@@ -67,6 +67,8 @@
 - Fixed bug #50590 (IntlDateFormatter::parse result is limited to the integer
   range). (Stas)
 - Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe)
+- Fixed bug #52260 (dns_get_record fails with non-existing domain on Windows).
+  (a_jelly_doughnut at phpbb dot com, Pierre)

 22 Jul 2010, PHP 5.3.3
 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia)

Modified: php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c       2010-09-06 
10:39:26 UTC (rev 303068)
+++ php/php-src/branches/PHP_5_3/ext/standard/dns_win32.c       2010-09-06 
10:57:42 UTC (rev 303069)
@@ -418,7 +418,7 @@
                        status = DnsQuery_A(hostname, type_to_fetch, 
DNS_QUERY_STANDARD, NULL, &pResult, NULL);

                        if (status) {
-                               if (status == DNS_INFO_NO_RECORDS) {
+                               if (status == DNS_INFO_NO_RECORDS || status == 
DNS_ERROR_RCODE_NAME_ERROR) {
                                        continue;
                                } else {
                                        php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Dns Query failed");

Modified: php/php-src/trunk/ext/standard/dns_win32.c
===================================================================
--- php/php-src/trunk/ext/standard/dns_win32.c  2010-09-06 10:39:26 UTC (rev 
303068)
+++ php/php-src/trunk/ext/standard/dns_win32.c  2010-09-06 10:57:42 UTC (rev 
303069)
@@ -420,7 +420,7 @@
                        status = DnsQuery_A(hostname, type_to_fetch, 
DNS_QUERY_STANDARD, NULL, &pResult, NULL);

                        if (status) {
-                               if (status == DNS_INFO_NO_RECORDS) {
+                               if (status == DNS_INFO_NO_RECORDS || status == 
DNS_ERROR_RCODE_NAME_ERROR) {
                                        continue;
                                } else {
                                        php_error_docref(NULL TSRMLS_CC, 
E_WARNING, "Dns Query failed");

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to