Author: cgutman
Date: Sun Aug 17 16:48:09 2008
New Revision: 35418
URL:
http://svn.reactos.org/svn/reactos?rev=35418&view=rev
Log:
- Call SocketStateUnlock before returning
- Don't complete the IRP again in the completion routine
Modified:
branches/aicom-network-fixes/drivers/network/afd/afd/connect.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/connect.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/connect.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/connect.c [iso-8859-1] Sun Aug 17
16:48:09 2008
@@ -77,7 +77,7 @@
/* I was wrong about this before as we can have pending writes to a not
* yet connected socket */
- if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
+ if( !SocketAcquireStateLock( FCB ) ) return STATUS_FILE_CLOSED;
AFD_DbgPrint(MID_TRACE,("Irp->IoStatus.Status = %x\n",
Irp->IoStatus.Status));
@@ -108,7 +108,10 @@
if( NT_SUCCESS(Status) ) {
Status = MakeSocketIntoConnection( FCB );
- if( !NT_SUCCESS(Status) ) return Status;
+ if( !NT_SUCCESS(Status) ) {
+ SocketStateUnlock( FCB );
+ return Status;
+ }
if( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_SEND] ) ) {
NextIrpEntry = RemoveHeadList(&FCB->PendingIrpList[FUNCTION_SEND]);