- Firstly mark the IRP as pending, and only then release the lock (otherwise IRP is firstly completed/freed, and then tried to be marked as pending). This makes FireFox 1.5 working again.

- NULLify handle in case of TdiOpenDevice() failure.

svn path=/trunk/; revision=27615
This commit is contained in:
Aleksey Bragin 2007-07-12 12:38:25 +00:00
parent 90ce81d302
commit 277f2718d0
2 changed files with 7 additions and 1 deletions

View file

@ -237,10 +237,15 @@ NTSTATUS NTAPI UnlockAndMaybeComplete
UINT Information,
PIO_COMPLETION_ROUTINE Completion,
BOOL ShouldUnlock ) {
SocketStateUnlock( FCB );
if( Status == STATUS_PENDING ) {
/* We should firstly mark this IRP as pending, because
otherwise it may be completed by StreamSocketConnectComplete()
before we return from SocketStateUnlock(). */
IoMarkIrpPending( Irp );
SocketStateUnlock( FCB );
} else {
SocketStateUnlock( FCB );
Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = Information;
if( Completion )

View file

@ -143,6 +143,7 @@ static NTSTATUS TdiOpenDevice(
}
} else {
AFD_DbgPrint(MIN_TRACE, ("ZwCreateFile() failed with status (0x%X)\n", Status));
*Handle = NULL;
}
return Status;