2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
[reactos.git] / reactos / drivers / net / tcpip / tcpip / irp.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
4 * FILE: tcpip/dispatch.h
5 * PURPOSE: TDI dispatch routines
6 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * REVISIONS:
8 * CSH 01/08-2000 Created
9 * TODO: Validate device object in all dispatch routines
10 */
11
12 #include "precomp.h"
13
14
15 NTSTATUS IRPFinish( PIRP Irp, NTSTATUS Status ) {
16 TI_DbgPrint(MID_TRACE,("Called: Irp %x, Status %x Event %x\n", Irp, Status, Irp->UserEvent));
17
18 IoSetCancelRoutine( Irp, NULL );
19
20 if( Status == STATUS_PENDING )
21 IoMarkIrpPending( Irp );
22 else {
23 Irp->IoStatus.Status = Status;
24 IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
25 }
26
27 return Status;
28 }
29