mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
[AFD]
- Mask out disabled events properly svn path=/trunk/; revision=57184
This commit is contained in:
parent
3587ef7aff
commit
bc74b19760
1 changed files with 6 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id$
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: drivers/net/afd/afd/select.c
|
* FILE: drivers/net/afd/afd/select.c
|
||||||
|
@ -304,9 +304,6 @@ AfdEventSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
{
|
{
|
||||||
AFD_DbgPrint(MID_TRACE,("Setting event %x\n", FCB->EventSelect));
|
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 */
|
/* Set the application's event */
|
||||||
KeSetEvent( FCB->EventSelect, IO_NETWORK_INCREMENT, FALSE );
|
KeSetEvent( FCB->EventSelect, IO_NETWORK_INCREMENT, FALSE );
|
||||||
}
|
}
|
||||||
|
@ -353,12 +350,15 @@ AfdEnumEvents( PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
KeClearEvent(UserEvent);
|
KeClearEvent(UserEvent);
|
||||||
ObDereferenceObject(UserEvent);
|
ObDereferenceObject(UserEvent);
|
||||||
|
|
||||||
/* Copy the poll state */
|
/* Copy the poll state, masking out disabled events */
|
||||||
EnumReq->PollEvents = FCB->PollState;
|
EnumReq->PollEvents = (FCB->PollState & ~FCB->EventSelectDisabled);
|
||||||
RtlCopyMemory( EnumReq->EventStatus,
|
RtlCopyMemory( EnumReq->EventStatus,
|
||||||
FCB->PollStatus,
|
FCB->PollStatus,
|
||||||
sizeof(EnumReq->EventStatus) );
|
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 );
|
return UnlockAndMaybeComplete( FCB, STATUS_SUCCESS, Irp, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,9 +431,6 @@ VOID PollReeval( PAFD_DEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject ) {
|
||||||
{
|
{
|
||||||
AFD_DbgPrint(MID_TRACE,("Setting event %x\n", FCB->EventSelect));
|
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 */
|
/* Set the application's event */
|
||||||
KeSetEvent( FCB->EventSelect, IO_NETWORK_INCREMENT, FALSE );
|
KeSetEvent( FCB->EventSelect, IO_NETWORK_INCREMENT, FALSE );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue