Christopher Haster / ESP8266Interface

Dependencies:   ESP8266

Fork of ESP8266Interface by NetworkSocketAPI

Branch:
api-changes
Revision:
46:6b1bd1268074
Parent:
45:538e5ce2f0d3
Child:
47:60a4b49e8b83
--- a/ESP8266Interface.cpp	Thu Feb 25 03:32:37 2016 -0600
+++ b/ESP8266Interface.cpp	Thu Feb 25 03:34:36 2016 -0600
@@ -83,10 +83,8 @@
         return NS_ERROR_NO_CONNECTION;
     }
 
-    _ip_address = _esp.getIPAddress();
-    _mac_address = _esp.getMACAddress();
-    if (!_ip_address || !_mac_address) {
-        return NS_ERROR_NO_ADDRESS;
+    if (!_esp.getIPAddress()) {
+        return NS_ERROR_DHCP_FAILURE;
     }
 
     return 0;
@@ -105,12 +103,12 @@
 
 const char *ESP8266Interface::getIPAddress()
 {
-    return _ip_address;
+    return _esp.getIPAddress();
 }
 
 const char *ESP8266Interface::getMACAddress()
 {
-    return _mac_address;
+    return _esp.getMACAddress();
 }
 
 SocketInterface *ESP8266Interface::createSocket(socket_protocol_t proto)