Author: cgutman
Date: Sun Jul 25 03:02:01 2010
New Revision: 48240
URL:
http://svn.reactos.org/svn/reactos?rev=48240&view=rev
Log:
[IPCONFIG]
- Fix the media detection code in ipconfig
Modified:
trunk/reactos/base/applications/network/ipconfig/ipconfig.c
Modified: trunk/reactos/base/applications/network/ipconfig/ipconfig.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/ipconfig/ipconfig.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/ipconfig/ipconfig.c [iso-8859-1] Sun Jul 25
03:02:01 2010
@@ -359,6 +359,7 @@
VOID ShowInfo(BOOL bAll)
{
+ MIB_IFROW mibEntry;
PIP_ADAPTER_INFO pAdapterInfo = NULL;
PIP_ADAPTER_INFO pAdapter = NULL;
ULONG adaptOutBufLen = 0;
@@ -441,6 +442,9 @@
{
LPTSTR IntType, myConType;
+ mibEntry.dwIndex = pAdapter->Index;
+ GetIfEntry(&mibEntry);
+
IntType = GetInterfaceTypeName(pAdapter->Type);
myConType = GetConnectionType(pAdapter->AdapterName);
@@ -449,7 +453,7 @@
if (myConType != NULL) HeapFree(ProcessHeap, 0, myConType);
/* check if the adapter is connected to the media */
- if (_tcscmp(pAdapter->IpAddressList.IpAddress.String, "0.0.0.0") ==
0)
+ if (mibEntry.dwOperStatus != MIB_IF_OPER_STATUS_CONNECTED &&
mibEntry.dwOperStatus != MIB_IF_OPER_STATUS_OPERATIONAL)
{
_tprintf(_T("\tMedia State . . . . . . . . . . . : Media
disconnected\n"));
pAdapter = pAdapter->Next;