Author: cgutman
Date: Sun Nov 9 11:39:55 2008
New Revision: 37266
URL:
http://svn.reactos.org/svn/reactos?rev=37266&view=rev
Log:
- Fix the parameter check
- Now AfdGetSockOrPeerName should work with Local == FALSE
- "MSAFD: STATUS_INVALID_PARAMETER" shouldn't fill the debug log anymore
when AfdGetSockOrPeerName gets called with Local == FALSE
Modified:
branches/aicom-network-fixes/drivers/network/afd/afd/info.c
Modified: branches/aicom-network-fixes/drivers/network/afd/afd/info.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/afd/afd/info.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/afd/afd/info.c [iso-8859-1] Sun Nov 9
11:39:55 2008
@@ -83,11 +83,6 @@
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
- if( FCB->AddressFile.Object == NULL) {
- return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0,
- NULL );
- }
-
Mdl = IoAllocateMdl
( Irp->UserBuffer,
IrpSp->Parameters.DeviceIoControl.OutputBufferLength,
@@ -105,11 +100,21 @@
if( NT_SUCCESS(Status) ) {
if( Local ) {
+ if( FCB->AddressFile.Object == NULL ) {
+ return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0,
+ NULL );
+ }
+
Status = TdiQueryInformation
( FCB->AddressFile.Object,
TDI_QUERY_ADDRESS_INFO,
Mdl );
} else {
+ if( FCB->Connection.Object == NULL ) {
+ return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0,
+ NULL );
+ }
+
if( NT_SUCCESS
( Status = TdiBuildNullConnectionInfo
( &ConnInfo,