change search function to honor ssdp:all and the proper urn
This commit is contained in:
parent
beda73ea3b
commit
4609c0b583
|
@ -359,7 +359,12 @@ class upnp_broadcast_responder(object):
|
||||||
def do_read(self, fileno):
|
def do_read(self, fileno):
|
||||||
data, sender = self.recvfrom(1024)
|
data, sender = self.recvfrom(1024)
|
||||||
if data:
|
if data:
|
||||||
if data.find('M-SEARCH') == 0 and data.find('urn:Belkin:device:**') != -1:
|
if data.find('M-SEARCH') == 0 and (
|
||||||
|
data.find('urn:Belkin:device:**') != -1 or
|
||||||
|
data.find('ssdp:all') != -1 or
|
||||||
|
data.find('urn:Belkin:device:controllee:1') != -1
|
||||||
|
):
|
||||||
|
|
||||||
for device in self.devices:
|
for device in self.devices:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
device.respond_to_search(sender, 'urn:Belkin:device:**')
|
device.respond_to_search(sender, 'urn:Belkin:device:**')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user