freebsd-ports/multimedia/vdr-plugin-xvdr/files/patch-src-xvdr-xvdrserver.c
Juergen Lock 7c720b5681 VDR plugin to handle XBMC clients.
The vdr-plugin-xvdr is able to handle serveral XBMC clients connecting
via the XVDR addon.

WWW: https://github.com/pipelka/vdr-plugin-xvdr
2011-12-18 17:23:38 +00:00

21 lines
756 B
C

--- a/src/xvdr/xvdrserver.c
+++ b/src/xvdr/xvdrserver.c
@@ -156,6 +156,7 @@ void cXVDRServer::NewClientConnected(int
int val = 1;
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
+#ifndef __FreeBSD__
val = 30;
setsockopt(fd, SOL_TCP, TCP_KEEPIDLE, &val, sizeof(val));
@@ -167,6 +168,10 @@ void cXVDRServer::NewClientConnected(int
val = 1;
setsockopt(fd, SOL_TCP, TCP_NODELAY, &val, sizeof(val));
+#else
+ val = 1;
+ setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
+#endif
INFOLOG("Client with ID %d connected: %s", m_IdCnt, cxSocket::ip2txt(sin.sin_addr.s_addr, sin.sin_port, buf));
cXVDRClient *connection = new cXVDRClient(fd, m_IdCnt, cxSocket::ip2txt(sin.sin_addr.s_addr, sin.sin_port, buf));