diff options
author | Cristian Maglie <c.maglie@bug.st> | 2012-12-17 16:53:45 +0100 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2012-12-17 16:53:45 +0100 |
commit | 5f4e55a3d274838388696c3f8130b0f2dc40daf7 (patch) | |
tree | 066cb0ff68142acbfe9cc4a45ec0ef596ff93919 /libraries/Ethernet | |
parent | bb9cc4f70c17eed497ab30d7bfe6eebb35055205 (diff) | |
parent | 09b755fb9c3f5c42fa9b38ffeef0dbfa2cfd8315 (diff) |
Merged 1.0.4 pre-release into 1.5
Diffstat (limited to 'libraries/Ethernet')
-rw-r--r-- | libraries/Ethernet/Dhcp.cpp | 1 | ||||
-rw-r--r-- | libraries/Ethernet/Ethernet.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libraries/Ethernet/Dhcp.cpp b/libraries/Ethernet/Dhcp.cpp index e4d27f7..56d5b69 100644 --- a/libraries/Ethernet/Dhcp.cpp +++ b/libraries/Ethernet/Dhcp.cpp @@ -43,6 +43,7 @@ int DhcpClass::request_DHCP_lease(){ _dhcpTransactionId = random(1UL, 2000UL);
_dhcpInitialTransactionId = _dhcpTransactionId;
+ _dhcpUdpSocket.stop();
if (_dhcpUdpSocket.begin(DHCP_CLIENT_PORT) == 0)
{
// Couldn't get a socket
diff --git a/libraries/Ethernet/Ethernet.cpp b/libraries/Ethernet/Ethernet.cpp index 5d28f71..c31a85f 100644 --- a/libraries/Ethernet/Ethernet.cpp +++ b/libraries/Ethernet/Ethernet.cpp @@ -10,7 +10,8 @@ uint16_t EthernetClass::_server_port[MAX_SOCK_NUM] = { int EthernetClass::begin(uint8_t *mac_address) { - _dhcp = new DhcpClass(); + static DhcpClass s_dhcp; + _dhcp = &s_dhcp; // Initialise the basic info |