Author: akhaldi
Date: Tue Oct 4 18:27:17 2016
New Revision: 72902
URL:
http://svn.reactos.org/svn/reactos?rev=72902&view=rev
Log:
[MSAFD] Partial implementation of SIO_ADDRESS_LIST_QUERY by Peter Hater. CORE-12000
Modified:
trunk/reactos/dll/win32/msafd/misc/dllmain.c
Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Tue Oct 4 18:27:17 2016
@@ -890,6 +890,9 @@
if(!NT_SUCCESS(Status))
{
+ if (lpErrno)
+ *lpErrno = WSAEFAULT;
+
ERR("NtCreateEvent failed, 0x%08x\n", Status);
return SOCKET_ERROR;
}
@@ -2055,6 +2058,24 @@
case SIO_GET_EXTENSION_FUNCTION_POINTER:
*lpErrno = WSAEINVAL;
return SOCKET_ERROR;
+
+ case SIO_ADDRESS_LIST_QUERY:
+ if (cbOutBuffer < (sizeof(SOCKET_ADDRESS_LIST) +
sizeof(Socket->WSLocalAddress)) || IS_INTRESOURCE(lpvOutBuffer))
+ {
+ *lpErrno = WSAEINVAL;
+ return SOCKET_ERROR;
+ }
+
+ *lpcbBytesReturned = sizeof(SOCKET_ADDRESS_LIST) +
+ sizeof(Socket->WSLocalAddress);
+
+ ((SOCKET_ADDRESS_LIST*)lpvOutBuffer)->iAddressCount = 1;
+ ((SOCKET_ADDRESS_LIST*)lpvOutBuffer)->Address[0].iSockaddrLength =
sizeof(Socket->WSLocalAddress);
+ ((SOCKET_ADDRESS_LIST*)lpvOutBuffer)->Address[0].lpSockaddr =
&Socket->WSLocalAddress;
+
+ *lpErrno = NO_ERROR;
+ return NO_ERROR;
+
default:
*lpErrno = Socket->HelperData->WSHIoctl(Socket->HelperContext,
Handle,