Author: cgutman
Date: Mon Aug 27 21:53:09 2012
New Revision: 57184
URL:
http://svn.reactos.org/svn/reactos?rev=57184&view=rev
Log:
[AFD]
- Mask out disabled events properly
Modified:
trunk/reactos/drivers/network/afd/afd/select.c
Modified: trunk/reactos/drivers/network/afd/afd/select.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/se…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] Mon Aug 27 21:53:09 2012
@@ -1,4 +1,4 @@
-/* $Id$
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/net/afd/afd/select.c
@@ -304,9 +304,6 @@
{
AFD_DbgPrint(MID_TRACE,("Setting event %x\n", FCB->EventSelect));
- /* Disable the events that triggered the select until the reenabling function is
called */
- FCB->EventSelectDisabled |= (FCB->PollState &
(FCB->EventSelectTriggers & ~FCB->EventSelectDisabled));
-
/* Set the application's event */
KeSetEvent( FCB->EventSelect, IO_NETWORK_INCREMENT, FALSE );
}
@@ -353,11 +350,14 @@
KeClearEvent(UserEvent);
ObDereferenceObject(UserEvent);
- /* Copy the poll state */
- EnumReq->PollEvents = FCB->PollState;
+ /* Copy the poll state, masking out disabled events */
+ EnumReq->PollEvents = (FCB->PollState & ~FCB->EventSelectDisabled);
RtlCopyMemory( EnumReq->EventStatus,
FCB->PollStatus,
sizeof(EnumReq->EventStatus) );
+
+ /* Disable the events that triggered the select until the reenabling function is
called */
+ FCB->EventSelectDisabled |= (FCB->PollState &
FCB->EventSelectTriggers);
return UnlockAndMaybeComplete( FCB, STATUS_SUCCESS, Irp, 0 );
}
@@ -431,9 +431,6 @@
{
AFD_DbgPrint(MID_TRACE,("Setting event %x\n", FCB->EventSelect));
- /* Disable the events that triggered the select until the reenabling function is
called */
- FCB->EventSelectDisabled |= (FCB->PollState &
(FCB->EventSelectTriggers & ~FCB->EventSelectDisabled));
-
/* Set the application's event */
KeSetEvent( FCB->EventSelect, IO_NETWORK_INCREMENT, FALSE );
}