Dependents:   TimeZoneDemo EthernetJackTestCode MMEx_Challenge ntp_mem ... more

Revision:
4:966a0265edfc
Parent:
3:5a6792c147c0
Child:
7:4e2468d7d5cb
--- a/if/eth/EthernetNetIf.cpp	Fri Nov 19 21:01:51 2010 +0000
+++ b/if/eth/EthernetNetIf.cpp	Sun Nov 21 17:13:44 2010 +0000
@@ -43,6 +43,7 @@
   //m_hostname = NULL;
   m_pNetIf = new netif;
   m_useDhcp = true;
+  m_pDhcp = new dhcp;
   m_setup = false;
 }
 
@@ -68,6 +69,9 @@
     delete m_pNetIf;
     eth_free();
   }
+  
+  if (m_pDhcp)
+    delete m_pDhcp;
 }
   
 EthernetErr EthernetNetIf::setup(int timeout_ms /*= 15000*/)
@@ -107,6 +111,7 @@
   
   if(m_useDhcp)
   {
+    dhcp_set_struct(m_pNetIf, m_pDhcp);
     dhcp_start(m_pNetIf);
     DBG("DHCP Started, waiting for IP...\n");
   }