From 1095bb09e8cadba69cb1ac0fc843e7f97e738d06 Mon Sep 17 00:00:00 2001 From: Maxim Sharabayko Date: Mon, 24 Feb 2020 17:16:52 +0100 Subject: [PATCH] Forgot SOL_SOCKET --- apps/transmitmedia.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/transmitmedia.cpp b/apps/transmitmedia.cpp index cb1a3aafbc..296b78f862 100644 --- a/apps/transmitmedia.cpp +++ b/apps/transmitmedia.cpp @@ -752,8 +752,8 @@ SocketOption udp_options [] { { "iptos", IPPROTO_IP, IP_TOS, SocketOption::PRE, SocketOption::INT, nullptr }, // IP_TTL and IP_MULTICAST_TTL are handled separately by a common option, "ttl". { "mcloop", IPPROTO_IP, IP_MULTICAST_LOOP, SocketOption::PRE, SocketOption::INT, nullptr }, - { "sndbuf", 0, SO_SNDBUF, SocketOption::PRE, SocketOption::INT, nullptr}, - { "rcvbuf", 0, SO_RCVBUF, SocketOption::PRE, SocketOption::INT, nullptr} + { "sndbuf", SOL_SOCKET, SO_SNDBUF, SocketOption::PRE, SocketOption::INT, nullptr}, + { "rcvbuf", SOL_SOCKET, SO_RCVBUF, SocketOption::PRE, SocketOption::INT, nullptr} }; static inline bool IsMulticast(in_addr adr) @@ -908,7 +908,7 @@ class UdpCommon int rcvbuf_size = 65536; socklen_t rcvbuf_len = sizeof(int); ::getsockopt(m_sock, SOL_SOCKET, SO_RCVBUF, (char*)&rcvbuf_size, &rcvbuf_len); - ::cout << "UDP old SO_RCVBUF: " << rcvbuf_size; + ::cout << "UDP old SO_RCVBUF: " << rcvbuf_size << ::endl; m_options = attr; @@ -925,7 +925,7 @@ class UdpCommon } ::getsockopt(m_sock, SOL_SOCKET, SO_RCVBUF, (char*)&rcvbuf_size, &rcvbuf_len); - ::cout << "UDP new SO_RCVBUF: " << rcvbuf_size; + ::cout << "UDP new SO_RCVBUF: " << rcvbuf_size << ::endl; } void Error(int err, string src)