Author: cgutman
Date: Tue Aug 10 08:52:48 2010
New Revision: 48508
URL:
http://svn.reactos.org/svn/reactos?rev=48508&view=rev
Log:
[MSWSOCK]
- Don't release the critical section because we don't own it
- Don't close the socket that we just created
- Fix a typo in SockSetInformation that broke it completely
Modified:
branches/aicom-network-branch/dll/win32/mswsock/msafd/accept.c
branches/aicom-network-branch/dll/win32/mswsock/msafd/proc.c
Modified: branches/aicom-network-branch/dll/win32/mswsock/msafd/accept.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/dll/win32/…
==============================================================================
--- branches/aicom-network-branch/dll/win32/mswsock/msafd/accept.c [iso-8859-1]
(original)
+++ branches/aicom-network-branch/dll/win32/mswsock/msafd/accept.c [iso-8859-1] Tue Aug 10
08:52:48 2010
@@ -825,9 +825,6 @@
Socket->SharedData.SizeOfLocalAddress);
AcceptedSocket->SharedData.SizeOfLocalAddress =
Socket->SharedData.SizeOfLocalAddress;
- /* We can release the accepted socket's lock now */
- LeaveCriticalSection(&AcceptedSocket->Lock);
-
/* Send IOCTL to Accept */
AcceptData.UseSAN = SockSanEnabled;
Status = NtDeviceIoControlFile(Socket->WshContext.Handle,
@@ -894,8 +891,8 @@
&ErrorCode);
/* Dereference the socket and clear its pointer for error code logic */
- SockDereferenceSocket(Socket);
LeaveCriticalSection(&Socket->Lock);
+ SockDereferenceSocket(Socket);
Socket = NULL;
error:
@@ -919,7 +916,7 @@
if (AcceptedSocket)
{
/* Check if the accepted socket also has a handle */
- if (ErrorCode == NO_ERROR)
+ if (ErrorCode != NO_ERROR)
{
/* Close the socket */
SockCloseSocket(AcceptedSocket);
Modified: branches/aicom-network-branch/dll/win32/mswsock/msafd/proc.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/dll/win32/…
==============================================================================
--- branches/aicom-network-branch/dll/win32/mswsock/msafd/proc.c [iso-8859-1] (original)
+++ branches/aicom-network-branch/dll/win32/mswsock/msafd/proc.c [iso-8859-1] Tue Aug 10
08:52:48 2010
@@ -142,7 +142,7 @@
NULL,
NULL,
&IoStatusBlock,
- IOCTL_AFD_GET_INFO,
+ IOCTL_AFD_SET_INFO,
&AfdInfo,
sizeof(AfdInfo),
NULL,