Revision:
8:f31bb718d362
Parent:
6:510bffa8b3d9
--- a/NTPClient.cpp	Tue Jan 03 13:28:59 2017 +0000
+++ b/NTPClient.cpp	Mon Dec 10 22:35:07 2018 +0000
@@ -49,7 +49,7 @@
 
 }*/
 
-NTPClient::NTPClient(NetworkStack & _m_intf) : m_intf(_m_intf)
+NTPClient::NTPClient(NetworkInterface  *m_intf) : m_intf( m_intf)
 {
 }
 
@@ -97,7 +97,7 @@
 #endif
 
   SocketAddress address(0, port);
-  int r = m_intf.gethostbyname(&address, host);  
+  int r = m_intf->gethostbyname(host, &address);
   if (r) {
         printf("error: 'gethostbyname(\"%s\")' failed with code %d\r\n", host, r);
   } else if (!address) {
@@ -106,7 +106,7 @@
   //printf ("address: %s\n\r",address.get_ip_address());
    
   //Create & bind socket
-  if (m_sock.open(&m_intf) < 0) printf ("ERROR sock open \n\r");  
+  if (m_sock.open(m_intf) < 0) printf ("ERROR sock open \n\r");
   m_sock.set_timeout(timeout);  
 
   struct NTPPacket pkt;