mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
list net/interfaces, trying to get the error on windows when possible
This commit is contained in:
parent
49a3b03e9f
commit
d9747c23a2
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue