- Call SocketStateUnlock before returning

- Don't complete the IRP again in the completion routine

svn path=/branches/aicom-network-fixes/; revision=35418
This commit is contained in:
Cameron Gutman 2008-08-17 21:48:09 +00:00
parent e070cbeb39
commit ec037e4d9d

View file

@ -77,7 +77,7 @@ static NTSTATUS NTAPI StreamSocketConnectComplete
/* 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 @@ static NTSTATUS NTAPI StreamSocketConnectComplete
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]);