com php-src: list net/interfaces, trying to get the error on windows when possible: ext/standard/net.c
| From: | Christoph Michael Becker | Date: | Fri, 24 May 2019 08:22:39 +0000 |
| Subject: | com php-src: list net/interfaces, trying to get the error on windows when possible: ext/standard/net.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106319@lists.php.net to get a copy of this message | ||
Commit: d9747c23a2e16825e141c5b2573afb805d42f97f
Author: David Carlier <devnexen@gmail.com> Thu, 23 May 2019 00:04:56 +0200
Committer: Christoph M. Becker <cmbecker69@gmx.de> Fri, 24 May 2019 10:22:39 +0200
Parents: 49a3b03e9fa3b6a7ef5302a48203b03e9d870ce9
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d9747c23a2e16825e141c5b2573afb805d42f97f
Log:
list net/interfaces, trying to get the error on windows when possible
Changed paths:
M ext/standard/net.c
Diff:
diff --git a/ext/standard/net.c b/ext/standard/net.c
index 6bec7f0..600ef8d 100644
--- a/ext/standard/net.c
+++ b/ext/standard/net.c
@@ -177,7 +177,9 @@ PHP_FUNCTION(net_get_interfaces) {
dwRetVal = GetAdaptersAddresses(family, flags, NULL, pAddresses, &outBufLen);
if (NO_ERROR != dwRetVal) {
- /* TODO check GetLastError() */
+ char *buf = php_win32_error_to_msg(GetLastError());
+ zend_error(E_WARNING, "GetAdaptersAddresses failed: %s", buf);
+ php_win32_error_msg_free(buf);
FREE(pAddresses);
RETURN_FALSE;
}