mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 01:42:30 +00:00
- 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:
parent
90ce81d302
commit
277f2718d0
|
@ -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 )
|
||||
|
|
|
@ -143,6 +143,7 @@ static NTSTATUS TdiOpenDevice(
|
|||
}
|
||||
} else {
|
||||
AFD_DbgPrint(MIN_TRACE, ("ZwCreateFile() failed with status (0x%X)\n", Status));
|
||||
*Handle = NULL;
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
|
Loading…
Reference in a new issue