From ce3850ab0183acfdfa77ba7dd336f6bafd1714f9 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Wed, 21 Sep 2011 11:26:55 +0000 Subject: [PATCH] [DHCPCSVC] Fix passing a 860B struct by value svn path=/trunk/; revision=53786 --- reactos/dll/win32/dhcpcsvc/dhcp/adapter.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c b/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c index 890972f945f..837c8871e42 100644 --- a/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c +++ b/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c @@ -190,13 +190,13 @@ void AdapterInit() { } int -InterfaceConnected(MIB_IFROW IfEntry) +InterfaceConnected(const PMIB_IFROW IfEntry) { - if (IfEntry.dwOperStatus == IF_OPER_STATUS_CONNECTED || - IfEntry.dwOperStatus == IF_OPER_STATUS_OPERATIONAL) + if (IfEntry->dwOperStatus == IF_OPER_STATUS_CONNECTED || + IfEntry->dwOperStatus == IF_OPER_STATUS_OPERATIONAL) return 1; - DH_DbgPrint(MID_TRACE,("Interface %d is down\n", IfEntry.dwIndex)); + DH_DbgPrint(MID_TRACE,("Interface %d is down\n", IfEntry->dwIndex)); return 0; } @@ -241,7 +241,7 @@ DWORD WINAPI AdapterDiscoveryThread(LPVOID Context) { if ((Adapter = AdapterFindByHardwareAddress(Table->table[i].bPhysAddr, Table->table[i].dwPhysAddrLen))) { /* This is an existing adapter */ - if (InterfaceConnected(Table->table[i])) { + if (InterfaceConnected(&Table->table[i])) { /* We're still active so we stay in the list */ ifi = &Adapter->DhclientInfo; } else { @@ -259,7 +259,7 @@ DWORD WINAPI AdapterDiscoveryThread(LPVOID Context) { Adapter = (DHCP_ADAPTER*) calloc( sizeof( DHCP_ADAPTER ) + Table->table[i].dwMtu, 1 ); - if( Adapter && Table->table[i].dwType == MIB_IF_TYPE_ETHERNET && InterfaceConnected(Table->table[i])) { + if( Adapter && Table->table[i].dwType == MIB_IF_TYPE_ETHERNET && InterfaceConnected(&Table->table[i])) { memcpy( &Adapter->IfMib, &Table->table[i], sizeof(Adapter->IfMib) ); Adapter->DhclientInfo.client = &Adapter->DhclientState;