81
81
const char * ssid = STASSID;
82
82
const char * password = STAPSK;
83
83
84
- clsLEAMDNSHost MDNS; // MDNS responder
84
+ clsLEAMDNSHost MDNSRESP; // MDNS responder
85
85
bool bHostDomainConfirmed = false ; // Flags the confirmation of the host domain
86
86
clsLEAMDNSHost::clsService* hMDNSService = 0 ; // The handle of the clock service in the MDNS responder
87
87
@@ -144,7 +144,7 @@ bool setStationHostname(const char* p_pcHostname) {
144
144
Add a dynamic MDNS TXT item 'ct' to the clock service.
145
145
The callback function is called every time, the TXT items for the clock service
146
146
are needed.
147
- This can be triggered by calling MDNS .announce().
147
+ This can be triggered by calling MDNSRESP .announce().
148
148
149
149
*/
150
150
void MDNSDynamicServiceTxtCallback (const clsLEAMDNSHost::hMDNSService& p_hService) {
@@ -223,7 +223,7 @@ void setup(void) {
223
223
224
224
// Setup MDNS responder
225
225
// Init the (currently empty) host domain string with 'leamdnsv2'
226
- if (MDNS .begin (" leamdnsv2" ,
226
+ if (MDNSRESP .begin (" leamdnsv2" ,
227
227
[](clsLEAMDNSHost & p_rMDNSHost, const char * p_pcDomainName, bool p_bProbeResult)->void {
228
228
if (p_bProbeResult) {
229
229
Serial.printf (" mDNSHost_AP::ProbeResultCallback: '%s' is %s\n " , p_pcDomainName, (p_bProbeResult ? " FREE" : " USED!" ));
@@ -233,7 +233,7 @@ void setup(void) {
233
233
hMDNSService->setDynamicServiceTxtCallback (MDNSDynamicServiceTxtCallback);
234
234
} else {
235
235
// Change hostname, use '-' as divider between base name and index
236
- MDNS .setHostName (clsLEAMDNSHost::indexDomainName (p_pcDomainName, " -" , 0 ));
236
+ MDNSRESP .setHostName (clsLEAMDNSHost::indexDomainName (p_pcDomainName, " -" , 0 ));
237
237
}
238
238
})) {
239
239
Serial.println (" mDNS-AP started" );
@@ -255,7 +255,7 @@ void loop(void) {
255
255
// Check if a request has come in
256
256
server.handleClient ();
257
257
// Allow MDNS processing
258
- MDNS .update ();
258
+ MDNSRESP .update ();
259
259
260
260
static esp8266::polledTimeout::periodicMs timeout (UPDATE_CYCLE);
261
261
if (timeout.expired ()) {
@@ -264,7 +264,7 @@ void loop(void) {
264
264
// Just trigger a new MDNS announcement, this will lead to a call to
265
265
// 'MDNSDynamicServiceTxtCallback', which will update the time TXT item
266
266
Serial.printf (" Announce trigger from user\n " );
267
- MDNS .announce ();
267
+ MDNSRESP .announce ();
268
268
}
269
269
}
270
270
0 commit comments