Author: cgutman
Date: Thu Jul 7 22:43:35 2011
New Revision: 52562
URL:
http://svn.reactos.org/svn/reactos?rev=52562&view=rev
Log:
[AFD]
- Signal the event immediately if the select triggers have already been satisfied
- This fixes hangs with applications that wait on the select event before performing any
socket operations
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] Thu Jul 7 22:43:35 2011
@@ -302,6 +302,11 @@
Status = STATUS_SUCCESS;
}
+ if( FCB->EventSelect && (FCB->PollState &
FCB->EventSelectTriggers) ) {
+ AFD_DbgPrint(MID_TRACE,("Setting event %x\n", FCB->EventSelect));
+ KeSetEvent( FCB->EventSelect, IO_NETWORK_INCREMENT, FALSE );
+ }
+
AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
return UnlockAndMaybeComplete( FCB, Status, Irp,