MiniLocateAdapter never zeroed Adapter if the adapter didn't match,
  and never actually ever matched a name.  It always returned the
  last adapter in the list.

svn path=/trunk/; revision=11790
This commit is contained in:
Filip Navara 2004-11-23 23:51:01 +00:00
parent f8246d2f62
commit 842b2d68dc

View file

@ -489,7 +489,7 @@ MiniLocateDevice(
ASSERT(Adapter);
NDIS_DbgPrint(DEBUG_MINIPORT, ("AdapterName = %wZ\n", &AdapterName));
NDIS_DbgPrint(DEBUG_MINIPORT, ("AdapterName = %wZ\n", AdapterName));
NDIS_DbgPrint(DEBUG_MINIPORT, ("DeviceName = %wZ\n", &Adapter->NdisMiniportBlock.MiniportName));
if (RtlCompareUnicodeString(AdapterName, &Adapter->NdisMiniportBlock.MiniportName, TRUE) == 0)
@ -498,6 +498,7 @@ MiniLocateDevice(
break;
}
Adapter = NULL;
CurrentEntry = CurrentEntry->Flink;
}
} while (0);