[ros-diffs] [pschweitzer] 53786: [DHCPCSVC] Fix passing a 860B struct by value

pschweitzer at svn.reactos.org pschweitzer at svn.reactos.org
Wed Sep 21 11:26:55 UTC 2011


Author: pschweitzer
Date: Wed Sep 21 11:26:55 2011
New Revision: 53786

URL: http://svn.reactos.org/svn/reactos?rev=53786&view=rev
Log:
[DHCPCSVC]
Fix passing a 860B struct by value

Modified:
    trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c

Modified: trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c?rev=53786&r1=53785&r2=53786&view=diff
==============================================================================
--- trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] Wed Sep 21 11:26:55 2011
@@ -190,13 +190,13 @@
 }
 
 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 @@
             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 @@
 
             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;




More information about the Ros-diffs mailing list