mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
more correctly responding to queries
also a small formatting fix. this should now allow the system to actually respond to SSDP discoveries that are issued on the network ... i'm still not 100% certain if this is right due to the way that the switch() statement is setup; it could be processing more than it should
This commit is contained in:
parent
17c3fb9ce6
commit
1950b10751
@ -307,8 +307,8 @@ void SSDPClass::_update(){
|
|||||||
case VALUE:
|
case VALUE:
|
||||||
if(cr == 2){
|
if(cr == 2){
|
||||||
switch(header){
|
switch(header){
|
||||||
case START:
|
case START:
|
||||||
break;
|
break;
|
||||||
case MAN:
|
case MAN:
|
||||||
#ifdef DEBUG_SSDP
|
#ifdef DEBUG_SSDP
|
||||||
DEBUG_SSDP.printf("MAN: %s\n", (char *)buffer);
|
DEBUG_SSDP.printf("MAN: %s\n", (char *)buffer);
|
||||||
@ -321,9 +321,12 @@ void SSDPClass::_update(){
|
|||||||
DEBUG_SSDP.printf("REJECT: %s\n", (char *)buffer);
|
DEBUG_SSDP.printf("REJECT: %s\n", (char *)buffer);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if(strcmp(buffer, "ssdp:discovery")){
|
// if the search type matches our type, we should respond
|
||||||
_send(NONE);
|
if(strcmp(buffer, _deviceType)){
|
||||||
state = ABORT;
|
_pending = true;
|
||||||
|
_process_time = millis();
|
||||||
|
state = KEY;
|
||||||
|
cursor += strlen(_deviceType);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MX:
|
case MX:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user