File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -166,9 +166,9 @@ static void wifi_cb(uint8_t u8MsgType, void *pvMsg)
166166 {
167167 if (WiFi._resolve != 0 ) {
168168 memcpy ((tstrSystemTime *)WiFi._resolve , pvMsg, sizeof (tstrSystemTime));
169- }
170169
171- WiFi._resolve = 0 ;
170+ WiFi._resolve = 0 ;
171+ }
172172 }
173173 break ;
174174
@@ -244,6 +244,7 @@ int WiFiClass::init()
244244 _submask = 0 ;
245245 _gateway = 0 ;
246246 _dhcp = 1 ;
247+ _resolve = 0 ;
247248 memset (_client, 0 , sizeof (WiFiClient *) * TCP_SOCK_MAX);
248249
249250 // Initialize IO expander LED control (rev A then rev B)..
@@ -830,6 +831,7 @@ int WiFiClass::hostByName(const char* aHostname, IPAddress& aResult)
830831 }
831832
832833 aResult = _resolve;
834+ _resolve = 0 ;
833835 return 1 ;
834836 }
835837}
@@ -899,9 +901,12 @@ int WiFiClass::ping(IPAddress host, uint8_t ttl)
899901 m2m_periph_gpio_set_val (M2M_PERIPH_GPIO5, 1 );
900902
901903 if (_resolve == dstHost) {
904+ _resolve = 0 ;
902905 return WL_PING_TIMEOUT;
903906 } else {
904- return (int )_resolve;
907+ int rtt = (int )_resolve;
908+ _resolve = 0 ;
909+ return _resolve;
905910 }
906911}
907912
You can’t perform that action at this time.
0 commit comments