com php-src: Changed based on comments and make its behaviour equal to the Windows version: ext/standard/dns.c ext/standard/dns_win3 2.c
| From: | Stanislav Malyshev | Date: | Mon, 01 Dec 2014 06:42:31 +0000 |
| Subject: | com php-src: Changed based on comments and make its behaviour equal to the Windows version: ext/standard/dns.c ext/standard/dns_win3 2.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83445@lists.php.net to get a copy of this message | ||
Commit: 0109eb07cf251e8c66d428e612f2b747e7e68a44
Author: Tjerk Meesters <datibbaw@php.net> Tue, 15 Jul 2014 20:12:33 +0800
Committer: Stanislav Malyshev <stas@php.net> Sun, 30 Nov 2014 22:42:31 -0800
Parents: f2b7aeda2b79b0f2a4f4ba2bcdebe3574b1d3a9e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0109eb07cf251e8c66d428e612f2b747e7e68a44
Log:
Changed based on comments and make its behaviour equal to the Windows version
Changed paths:
M ext/standard/dns.c
M ext/standard/dns_win32.c
Diff:
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 52b1b1e..7060d3f 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -896,10 +896,10 @@ PHP_FUNCTION(dns_get_record)
if (n < 0) {
php_dns_free_handle(handle);
- if (h_errno == NO_DATA) {
+ if (h_errno == NO_DATA || h_errno == HOST_NOT_FOUND) {
continue;
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dns Query failed");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "DNS Query failed");
zval_dtor(return_value);
RETURN_FALSE;
}
diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c
index 963d1f7..a0b917c 100644
--- a/ext/standard/dns_win32.c
+++ b/ext/standard/dns_win32.c
@@ -456,7 +456,7 @@ PHP_FUNCTION(dns_get_record)
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_error_docref(NULL TSRMLS_CC, E_WARNING, "DNS Query failed");
zval_dtor(return_value);
RETURN_FALSE;
}