Skip to content

Commit

Permalink
Tweak to get PicoRendezvous working on chumby
Browse files Browse the repository at this point in the history
  • Loading branch information
lilspikey committed Sep 22, 2010
1 parent d4356b3 commit 33bbfa1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion PicoRendezvous.py
Expand Up @@ -58,7 +58,12 @@ def server_bind(self):
self.socket.bind(self.group)
except:
pass
self.socket.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF, socket.inet_aton(socket.gethostbyname(socket.gethostname())) + socket.inet_aton('0.0.0.0'))
# gethostname() doesn't return a valid name on the chumby (none)
# which triggers an error when calling gethostbyname
# so removed it
#self.socket.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF, socket.inet_aton(socket.gethostbyname(socket.gethostname())) + socket.inet_aton('0.0.0.0'))
self.socket.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF, socket.inet_aton('0.0.0.0'))

self.socket.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP, socket.inet_aton(_MDNS_ADDR) + socket.inet_aton('0.0.0.0'))
self.socket.settimeout(0.1)
# end def
Expand Down

0 comments on commit 33bbfa1

Please sign in to comment.