Author: cgutman
Date: Mon Aug 27 22:18:29 2012
New Revision: 57185
URL:
http://svn.reactos.org/svn/reactos?rev=57185&view=rev
Log:
[AFD]
- Fix enabling of some event select triggers
Modified:
trunk/reactos/drivers/network/afd/afd/listen.c
trunk/reactos/drivers/network/afd/afd/read.c
Modified: trunk/reactos/drivers/network/afd/afd/listen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/li…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] Mon Aug 27 22:18:29 2012
@@ -327,6 +327,8 @@
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
+ FCB->EventSelectDisabled &= ~AFD_EVENT_ACCEPT;
+
for( PendingConn = FCB->PendingConnections.Flink;
PendingConn != &FCB->PendingConnections;
PendingConn = PendingConn->Flink ) {
@@ -364,8 +366,6 @@
ExFreePool( PendingConnObj );
- FCB->EventSelectDisabled &= ~AFD_EVENT_ACCEPT;
-
if( !IsListEmpty( &FCB->PendingConnections ) )
{
FCB->PollState |= AFD_EVENT_ACCEPT;
Modified: trunk/reactos/drivers/network/afd/afd/read.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/re…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] Mon Aug 27 22:18:29 2012
@@ -436,6 +436,8 @@
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
+ FCB->EventSelectDisabled &= ~AFD_EVENT_RECEIVE;
+
if( !(FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS) &&
FCB->State != SOCKET_STATE_CONNECTED &&
FCB->State != SOCKET_STATE_CONNECTING ) {
@@ -460,8 +462,6 @@
return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION,
Irp, 0 );
}
-
- FCB->EventSelectDisabled &= ~AFD_EVENT_RECEIVE;
if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS )
{
@@ -704,6 +704,8 @@
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
+ FCB->EventSelectDisabled &= ~AFD_EVENT_RECEIVE;
+
/* Check that the socket is bound */
if( FCB->State != SOCKET_STATE_BOUND )
{
@@ -732,8 +734,6 @@
return UnlockAndMaybeComplete(FCB, STATUS_ACCESS_VIOLATION, Irp, 0);
}
- FCB->EventSelectDisabled &= ~AFD_EVENT_RECEIVE;
-
if (!IsListEmpty(&FCB->DatagramList))
{
ListEntry = RemoveHeadList(&FCB->DatagramList);