Sorry, wrong version got commited

svn path=/trunk/; revision=15160
This commit is contained in:
Alex Ionescu 2005-05-09 00:41:55 +00:00
parent 4cced63916
commit 261e754d28

View file

@ -4,7 +4,8 @@
* FILE: ntoskrnl/io/irp.c * FILE: ntoskrnl/io/irp.c
* PURPOSE: Handle IRPs * PURPOSE: Handle IRPs
* *
* PROGRAMMERS: Alex Ionescu (alex@relsoft.net) * PROGRAMMERS: Hartmut Birr
* Alex Ionescu (alex@relsoft.net)
* David Welch (welch@mcmail.com) * David Welch (welch@mcmail.com)
*/ */
@ -104,7 +105,7 @@ IopCompleteRequest(PKAPC Apc,
while ((Mdl = Irp->MdlAddress)) while ((Mdl = Irp->MdlAddress))
{ {
/* Clear all of them */ /* Clear all of them */
Irp->MdlAddress = Mdl->Next; Irp->MdlAddress = Mdl->Next;
IoFreeMdl(Mdl); IoFreeMdl(Mdl);
} }
@ -150,10 +151,10 @@ IopCompleteRequest(PKAPC Apc,
KeSetEvent(UserEvent, 0, FALSE); KeSetEvent(UserEvent, 0, FALSE);
/* Dereference the Event if this is an ASYNC IRP */ /* Dereference the Event if this is an ASYNC IRP */
if (FileObject && !SyncIrp && UserEvent != &FileObject->Event) if (FileObject && !SyncIrp && UserEvent != &FileObject->Event)
{ {
ObDereferenceObject(UserEvent); ObDereferenceObject(UserEvent);
} }
} }
else if (FileObject) else if (FileObject)
{ {
@ -181,7 +182,7 @@ IopCompleteRequest(PKAPC Apc,
Irp->UserIosb, Irp->UserIosb,
NULL, NULL,
2); 2);
Irp = NULL; Irp = NULL;
} }
else if (FileObject && FileObject->CompletionContext) else if (FileObject && FileObject->CompletionContext)
{ {
@ -192,7 +193,7 @@ IopCompleteRequest(PKAPC Apc,
Irp->IoStatus.Status, Irp->IoStatus.Status,
Irp->IoStatus.Information, Irp->IoStatus.Information,
FALSE); FALSE);
Irp = NULL; Irp = NULL;
} }
} }
else else
@ -204,15 +205,15 @@ IopCompleteRequest(PKAPC Apc,
if (SyncIrp) if (SyncIrp)
{ {
/* Set the status in this case only */ /* Set the status in this case only */
_SEH_TRY _SEH_TRY
{ {
*Irp->UserIosb = Irp->IoStatus; *Irp->UserIosb = Irp->IoStatus;
} }
_SEH_HANDLE _SEH_HANDLE
{ {
/* Ignore any error */ /* Ignore any error */
} }
_SEH_END; _SEH_END;
/* Signal our event if we have one */ /* Signal our event if we have one */
if (UserEvent) if (UserEvent)
@ -228,16 +229,16 @@ IopCompleteRequest(PKAPC Apc,
else else
{ {
#if 1 #if 1
/* FIXME: This is necessary to fix bug #609 */ /* FIXME: This is necessary to fix bug #609 */
_SEH_TRY _SEH_TRY
{ {
*Irp->UserIosb = Irp->IoStatus; *Irp->UserIosb = Irp->IoStatus;
} }
_SEH_HANDLE _SEH_HANDLE
{ {
/* Ignore any error */ /* Ignore any error */
} }
_SEH_END; _SEH_END;
#endif #endif
/* We'll report the Status to the File Object, not the IRP */ /* We'll report the Status to the File Object, not the IRP */
FileObject->FinalStatus = Irp->IoStatus.Status; FileObject->FinalStatus = Irp->IoStatus.Status;
@ -260,11 +261,8 @@ IopCompleteRequest(PKAPC Apc,
/* Dereference the File Object */ /* Dereference the File Object */
if (FileObject) ObDereferenceObject(FileObject); if (FileObject) ObDereferenceObject(FileObject);
if (Irp) /* Free the IRP */
{ if (Irp) IoFreeIrp(Irp);
/* Free the IRP */
IoFreeIrp(Irp);
}
#else #else