mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:52:54 +00:00
I had put an IOSB on the stack in TdiConnect. Now we use a PendingIrp
struct that associates it with an IRP. Better. svn path=/trunk/; revision=12098
This commit is contained in:
parent
c4f4ef9ea2
commit
402db44755
4 changed files with 9 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: connect.c,v 1.8 2004/12/11 14:59:31 navaraf Exp $
|
/* $Id: connect.c,v 1.9 2004/12/13 21:20:37 arty Exp $
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: drivers/net/afd/afd/connect.c
|
* FILE: drivers/net/afd/afd/connect.c
|
||||||
|
@ -194,9 +194,10 @@ AfdStreamSocketConnect(PDEVICE_OBJECT DeviceObject, PIRP Irp,
|
||||||
&ConnectReq->RemoteAddress );
|
&ConnectReq->RemoteAddress );
|
||||||
|
|
||||||
if( TargetAddress ) {
|
if( TargetAddress ) {
|
||||||
Status = TdiConnect( &FCB->PendingTdiIrp,
|
Status = TdiConnect( &FCB->ConnectIrp.InFlightRequest,
|
||||||
FCB->Connection.Object,
|
FCB->Connection.Object,
|
||||||
TargetAddress,
|
TargetAddress,
|
||||||
|
&FCB->ConnectIrp.Iosb,
|
||||||
StreamSocketConnectComplete,
|
StreamSocketConnectComplete,
|
||||||
FCB );
|
FCB );
|
||||||
|
|
||||||
|
|
|
@ -272,6 +272,7 @@ NTSTATUS TdiConnect(
|
||||||
PIRP *Irp,
|
PIRP *Irp,
|
||||||
PFILE_OBJECT ConnectionObject,
|
PFILE_OBJECT ConnectionObject,
|
||||||
PTDI_CONNECTION_INFORMATION RemoteAddress,
|
PTDI_CONNECTION_INFORMATION RemoteAddress,
|
||||||
|
PIO_STATUS_BLOCK Iosb,
|
||||||
PIO_COMPLETION_ROUTINE CompletionRoutine,
|
PIO_COMPLETION_ROUTINE CompletionRoutine,
|
||||||
PVOID CompletionContext)
|
PVOID CompletionContext)
|
||||||
/*
|
/*
|
||||||
|
@ -284,7 +285,6 @@ NTSTATUS TdiConnect(
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
PDEVICE_OBJECT DeviceObject;
|
PDEVICE_OBJECT DeviceObject;
|
||||||
IO_STATUS_BLOCK Iosb;
|
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
AFD_DbgPrint(MAX_TRACE, ("Called\n"));
|
AFD_DbgPrint(MAX_TRACE, ("Called\n"));
|
||||||
|
@ -297,7 +297,7 @@ NTSTATUS TdiConnect(
|
||||||
DeviceObject, /* Device object */
|
DeviceObject, /* Device object */
|
||||||
ConnectionObject, /* File object */
|
ConnectionObject, /* File object */
|
||||||
NULL, /* Event */
|
NULL, /* Event */
|
||||||
&Iosb); /* Status */
|
Iosb); /* Status */
|
||||||
if (!*Irp) {
|
if (!*Irp) {
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ NTSTATUS TdiConnect(
|
||||||
RemoteAddress, /* Request connection information */
|
RemoteAddress, /* Request connection information */
|
||||||
RemoteAddress); /* Return connection information */
|
RemoteAddress); /* Return connection information */
|
||||||
|
|
||||||
Status = TdiCall(*Irp, DeviceObject, NULL, &Iosb);
|
Status = TdiCall(*Irp, DeviceObject, NULL, Iosb);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: afd.h,v 1.27 2004/12/11 14:59:31 navaraf Exp $
|
/* $Id: afd.h,v 1.28 2004/12/13 21:20:38 arty Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -133,7 +133,7 @@ typedef struct _AFD_FCB {
|
||||||
PTRANSPORT_ADDRESS LocalAddress, RemoteAddress;
|
PTRANSPORT_ADDRESS LocalAddress, RemoteAddress;
|
||||||
PTDI_CONNECTION_INFORMATION AddressFrom;
|
PTDI_CONNECTION_INFORMATION AddressFrom;
|
||||||
AFD_TDI_OBJECT AddressFile, Connection;
|
AFD_TDI_OBJECT AddressFile, Connection;
|
||||||
AFD_IN_FLIGHT_REQUEST ListenIrp, ReceiveIrp, SendIrp;
|
AFD_IN_FLIGHT_REQUEST ConnectIrp, ListenIrp, ReceiveIrp, SendIrp;
|
||||||
AFD_DATA_WINDOW Send, Recv;
|
AFD_DATA_WINDOW Send, Recv;
|
||||||
FAST_MUTEX Mutex;
|
FAST_MUTEX Mutex;
|
||||||
KEVENT StateLockedEvent;
|
KEVENT StateLockedEvent;
|
||||||
|
@ -144,7 +144,6 @@ typedef struct _AFD_FCB {
|
||||||
PVOID Context;
|
PVOID Context;
|
||||||
DWORD PollState;
|
DWORD PollState;
|
||||||
UINT ContextSize;
|
UINT ContextSize;
|
||||||
PIRP PendingTdiIrp;
|
|
||||||
LIST_ENTRY PendingIrpList[MAX_FUNCTIONS];
|
LIST_ENTRY PendingIrpList[MAX_FUNCTIONS];
|
||||||
LIST_ENTRY DatagramList;
|
LIST_ENTRY DatagramList;
|
||||||
} AFD_FCB, *PAFD_FCB;
|
} AFD_FCB, *PAFD_FCB;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
NTSTATUS TdiConnect( PIRP *PendingIrp,
|
NTSTATUS TdiConnect( PIRP *PendingIrp,
|
||||||
PFILE_OBJECT ConnectionObject,
|
PFILE_OBJECT ConnectionObject,
|
||||||
PTDI_CONNECTION_INFORMATION RemoteAddress,
|
PTDI_CONNECTION_INFORMATION RemoteAddress,
|
||||||
|
PIO_STATUS_BLOCK Iosb,
|
||||||
PIO_COMPLETION_ROUTINE CompletionRoutine,
|
PIO_COMPLETION_ROUTINE CompletionRoutine,
|
||||||
PVOID CompletionContext );
|
PVOID CompletionContext );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue