Skip to content

Commit bffd385

Browse files
Merge branch 'master' into gdb
2 parents e72291a + b26c19e commit bffd385

File tree

11 files changed

+29
-18
lines changed

11 files changed

+29
-18
lines changed

libraries/ESP8266mDNS/examples/LEAmDNS/mDNS_Clock/mDNS_Clock.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@ bool MDNSProbeResultCallback(MDNSResponder* p_pMDNSResponder,
189189
p_pMDNSResponder->setDynamicServiceTxtCallback(hMDNSService, MDNSDynamicServiceTxtCallback, 0);
190190
}
191191
}
192+
}
193+
} else {
194+
// Change hostname, use '-' as divider between base name and index
195+
if (MDNSResponder::indexDomain(pcHostDomain, "-", 0)) {
196+
p_pMDNSResponder->setHostname(pcHostDomain);
192197
} else {
193-
// Change hostname, use '-' as divider between base name and index
194-
if (MDNSResponder::indexDomain(pcHostDomain, "-", 0)) {
195-
p_pMDNSResponder->setHostname(pcHostDomain);
196-
} else {
197-
Serial.println("MDNSProbeResultCallback: FAILED to update hostname!");
198-
}
198+
Serial.println("MDNSProbeResultCallback: FAILED to update hostname!");
199199
}
200200
}
201201
}
@@ -241,8 +241,8 @@ void handleHTTPClient(WiFiClient& client) {
241241
if (req == "/") {
242242
IPAddress ip = WiFi.localIP();
243243
String ipStr = String(ip[0]) + '.' + String(ip[1]) + '.' + String(ip[2]) + '.' + String(ip[3]);
244-
s = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<!DOCTYPE HTML>\r\n<html>Hello from ESP8266 at ";
245-
s += ipStr;
244+
s = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<!DOCTYPE HTML>\r\n<html>Hello from ";
245+
s += WiFi.hostname() + " at " + ipStr;
246246
// Simple addition of the current time
247247
s += "\r\nCurrent time is: ";
248248
s += getTimeString();

libraries/ESP8266mDNS/examples/LEAmDNS/mDNS_ServiceMonitor/mDNS_ServiceMonitor.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@ bool MDNSProbeResultCallback(MDNSResponder* p_pMDNSResponder,
233233
}
234234
}
235235
}
236+
}
237+
} else {
238+
// Change hostname, use '-' as divider between base name and index
239+
if (MDNSResponder::indexDomain(pcHostDomain, "-", 0)) {
240+
p_pMDNSResponder->setHostname(pcHostDomain);
236241
} else {
237-
// Change hostname, use '-' as divider between base name and index
238-
if (MDNSResponder::indexDomain(pcHostDomain, "-", 0)) {
239-
p_pMDNSResponder->setHostname(pcHostDomain);
240-
} else {
241-
Serial.println("MDNSProbeResultCallback: FAILED to update hostname!");
242-
}
242+
Serial.println("MDNSProbeResultCallback: FAILED to update hostname!");
243243
}
244244
}
245245
}
@@ -280,8 +280,8 @@ void handleHTTPClient(WiFiClient& client) {
280280
if (req == "/") {
281281
IPAddress ip = WiFi.localIP();
282282
String ipStr = String(ip[0]) + '.' + String(ip[1]) + '.' + String(ip[2]) + '.' + String(ip[3]);
283-
s = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<!DOCTYPE HTML>\r\n<html>Hello from ESP8266 at ";
284-
s += ipStr;
283+
s = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<!DOCTYPE HTML>\r\n<html>Hello from ";
284+
s += WiFi.hostname() + " at " + ipStr;
285285
// Simple addition of the current time
286286
s += "<br/>Local HTTP services:<br/>";
287287
s += strHTTPServices;

tools/sdk/lib/liblwip2-1460-feat.a

-3.74 KB
Binary file not shown.

tools/sdk/lib/liblwip2-1460.a

-3.71 KB
Binary file not shown.

tools/sdk/lib/liblwip2-536-feat.a

-3.74 KB
Binary file not shown.

tools/sdk/lib/liblwip2-536.a

-3.72 KB
Binary file not shown.

tools/sdk/lib/liblwip6-1460-feat.a

-652 Bytes
Binary file not shown.

tools/sdk/lib/liblwip6-536-feat.a

-652 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// generated by makefiles/make-lwip2-hash
22
#ifndef LWIP_HASH_H
33
#define LWIP_HASH_H
4-
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.0-6-g4670dfc"
4+
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.0-9-g56e0410"
55
#endif // LWIP_HASH_H

tools/sdk/lwip2/include/lwip/ip_addr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ extern const ip_addr_t ip_addr_any_type;
169169
ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }while(0)
170170
/** @ingroup ip6addr */
171171
#define ip_addr_set_zero_ip6(ipaddr) do{ \
172-
ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }while(0)
172+
ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE_VAL(*ipaddr, IPADDR_TYPE_V6); }while(0)
173173
/** @ingroup ipaddr */
174174
#define ip_addr_set_any(is_ipv6, ipaddr) do{if(is_ipv6){ \
175175
ip6_addr_set_any(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \

0 commit comments

Comments
 (0)