mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 23:06:00 +00:00
- Check if MakeSocketIntoConnection succeeded
- Check if TaCopyTransportAddress succeeded svn path=/branches/aicom-network-fixes/; revision=35784
This commit is contained in:
parent
17c1d9b828
commit
60899277f8
1 changed files with 13 additions and 6 deletions
|
@ -17,6 +17,7 @@ static VOID SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt,
|
|||
PFILE_OBJECT NewFileObject,
|
||||
PAFD_TDI_OBJECT_QELT Qelt ) {
|
||||
PAFD_FCB FCB = NewFileObject->FsContext;
|
||||
NTSTATUS Status;
|
||||
|
||||
if( !SocketAcquireStateLock( FCB ) ) {
|
||||
LostSocket( Irp );
|
||||
|
@ -33,16 +34,22 @@ static VOID SatisfyAccept( PAFD_DEVICE_EXTENSION DeviceExt,
|
|||
FCB->RemoteAddress =
|
||||
TaCopyTransportAddress( Qelt->ConnInfo->RemoteAddress );
|
||||
|
||||
if( !FCB->RemoteAddress )
|
||||
Status = STATUS_NO_MEMORY;
|
||||
else
|
||||
Status = MakeSocketIntoConnection( FCB );
|
||||
|
||||
if( NT_SUCCESS(Status) ) {
|
||||
FCB->PollState |= AFD_EVENT_SEND;
|
||||
PollReeval( DeviceExt, NewFileObject );
|
||||
}
|
||||
|
||||
if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) );
|
||||
|
||||
|
||||
Irp->IoStatus.Information = 0;
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Status = Status;
|
||||
IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
|
||||
|
||||
MakeSocketIntoConnection( FCB );
|
||||
FCB->PollState |= AFD_EVENT_SEND;
|
||||
PollReeval( DeviceExt, NewFileObject );
|
||||
|
||||
SocketStateUnlock( FCB );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue