Closed pvint closed 5 years ago
Original report by M Hightower (Bitbucket: mhightower83, GitHub: mhightower83).
First, thank you for the fine work you do on fauxmoESP and ESPurna.
This issue is in commit 7442667 on the dev branch.
A corner case in the handling of _devices[device_id].hit.
_devices[device_id].hit
M-SEARCH
_discovering
GET /setup.xml HTTP/1.1
true
_handleSetup(...)
device_id
_current
_nextUDPResponse()
I made this change in _nextUDPResponse():
if (_discovering && client->remoteIP == _remoteIP) _devices[device_id].hit = true;
I think window for this problem is small; however, it grows as the number of devices grows.
Original comment by Xose Pérez (Bitbucket: [Xose Pérez](https://bitbucket.org/Xose Pérez), ).
This no longer applies
Original report by M Hightower (Bitbucket: mhightower83, GitHub: mhightower83).
First, thank you for the fine work you do on fauxmoESP and ESPurna.
This issue is in commit 7442667 on the dev branch.
A corner case in the handling of
_devices[device_id].hit
.M-SEARCH
request. (_discovering
flag is true)M-SEARCH
is ignored via your_discovering
flag.GET /setup.xml HTTP/1.1
request._devices[device_id].hit
to be settrue
, erroneously in_handleSetup(...)
.device_id
is the same as_current
or any other device that has not been serviced, then it will be skipped in_nextUDPResponse()
.I made this change in
_nextUDPResponse()
:I think window for this problem is small; however, it grows as the number of devices grows.