Author: cgutman Date: Fri Aug 29 21:30:27 2008 New Revision: 35784
URL: http://svn.reactos.org/svn/reactos?rev=35784&view=rev Log: - Check if MakeSocketIntoConnection succeeded - Check if TaCopyTransportAddress succeeded
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/listen.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/listen.c URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/netw... ============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/listen.c [iso-8859-1] Fri Aug 29 21:30:27 2008 @@ -17,6 +17,7 @@ PFILE_OBJECT NewFileObject, PAFD_TDI_OBJECT_QELT Qelt ) { PAFD_FCB FCB = NewFileObject->FsContext; + NTSTATUS Status;
if( !SocketAcquireStateLock( FCB ) ) { LostSocket( Irp ); @@ -33,15 +34,21 @@ 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 ); }