()
| 336 | } |
| 337 | |
| 338 | advertiseServer() { |
| 339 | let name = this.prefs.name; |
| 340 | if (this.usingAP) |
| 341 | name = ap_name; |
| 342 | |
| 343 | this.mdns = new MDNS({hostName: name, prefs: this.prefs}, function(message, value) { |
| 344 | if (1 === message) { |
| 345 | if ('' !== value) { |
| 346 | if (value !== clock.prefs.name) { |
| 347 | clock.prefs.name = value; |
| 348 | } |
| 349 | } |
| 350 | } |
| 351 | }); |
| 352 | this.mdns.clock = this; |
| 353 | } |
| 354 | |
| 355 | checkName(newName, oldName) { |
| 356 | if ((undefined !== newName) && (newName.length > 3) && (newName != oldName)) { |