Fix patch to set IP_MULTICAST_TTL socket option correctly.
OK jasper@
This commit is contained in:
parent
0394814041
commit
ef7d0a1f88
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.2 2014/01/18 09:45:03 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 2014/01/22 20:39:04 jeremy Exp $
|
||||
|
||||
COMMENT = control Sonos speakers with Ruby
|
||||
|
||||
DISTNAME = sonos-0.3.4
|
||||
REVISION = 0
|
||||
REVISION = 1
|
||||
|
||||
CATEGORIES = audio net
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
$OpenBSD: patch-lib_sonos_discovery_rb,v 1.1.1.1 2014/01/18 09:32:32 jasper Exp $
|
||||
$OpenBSD: patch-lib_sonos_discovery_rb,v 1.2 2014/01/22 20:39:04 jeremy Exp $
|
||||
|
||||
XXX: emulate Linux' multicast TTL until either ruby or the kernel are
|
||||
fixed to deal with unsigned char options, or to accept int options.
|
||||
IP_MULTICAST_TTL socket option on OpenBSD currently doesn't accept
|
||||
int, only unsigned char.
|
||||
|
||||
--- lib/sonos/discovery.rb.orig Fri Jan 17 15:09:37 2014
|
||||
+++ lib/sonos/discovery.rb Fri Jan 17 15:09:45 2014
|
||||
--- lib/sonos/discovery.rb.orig Wed Dec 31 16:00:00 1969
|
||||
+++ lib/sonos/discovery.rb Wed Jan 22 10:20:28 2014
|
||||
@@ -75,7 +75,7 @@ module Sonos
|
||||
@socket = UDPSocket.open
|
||||
|
||||
# We're going to use IP with the multicast TTL. Mystery third parameter is a mystery.
|
||||
- @socket.setsockopt(Socket::IPPROTO_IP, Socket::IP_MULTICAST_TTL, 2)
|
||||
+ @socket.setsockopt(Socket::IPPROTO_IP, 33, 2)
|
||||
+ @socket.setsockopt(Socket::Option.new(:INET, :IPPROTO_IP, :IP_MULTICAST_TTL, 2.chr))
|
||||
end
|
||||
|
||||
def search_message
|
||||
|
Loading…
Reference in New Issue
Block a user