Switched the sense of the onlyLoopback flag in getNumNonLoopbackAdapters

and kin.  I had the sense of needing only loopback adapters or all adapters
inverted.

Our info ioctl still misidentifies the adapters with respect to loopback
and not.

svn path=/trunk/; revision=9788
This commit is contained in:
Art Yerkes 2004-06-21 02:21:16 +00:00
parent 16ea2c47a7
commit 1fe3a2d6c3

View file

@ -393,7 +393,7 @@ static NTSTATUS getInterfaceInfoSet( HANDLE tcpFile,
return STATUS_SUCCESS;
}
static DWORD getNumInterfacesInt(BOOL onlyLoopback)
static DWORD getNumInterfacesInt(BOOL onlyNonLoopback)
{
DWORD numEntities, numInterfaces = 0;
TDIEntityID *entitySet;
@ -419,7 +419,8 @@ static DWORD getNumInterfacesInt(BOOL onlyLoopback)
for( i = 0; i < numEntities; i++ ) {
if( isInterface( &entitySet[i] ) &&
(!onlyLoopback || isLoopback( tcpFile, &entitySet[i] )) )
(!onlyNonLoopback ||
(onlyNonLoopback && !isLoopback( tcpFile, &entitySet[i] ))) )
numInterfaces++;
}