Browse files

Tweak to get PicoRendezvous working on chumby

  • Loading branch information...
1 parent d4356b3 commit 33bbfa13cbd81691b5dcac2a48b84aea38a4c0f0 @lilspikey committed Sep 22, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 PicoRendezvous.py
View
7 PicoRendezvous.py
@@ -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

0 comments on commit 33bbfa1

Please sign in to comment.