diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-02-27 05:36:05 +0300 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2009-02-27 05:36:05 +0300 |
commit | a5a3a73bf148397ad672c46e2f34fdde9c02f331 (patch) | |
tree | 601966ed4542056b21720bd3a14045dcca830af8 /src/murmur | |
parent | f56a47f388402c62eef910f3023f091fd6d6b413 (diff) |
Unbreak QoS on Unix
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1592 05730e5d-ab1b-0410-a4ac-84af385074fa
Diffstat (limited to 'src/murmur')
-rw-r--r-- | src/murmur/Server.cpp | 7 | ||||
-rw-r--r-- | src/murmur/UnixMurmur.cpp | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/murmur/Server.cpp b/src/murmur/Server.cpp index dd87fc6ec..d6aadc2dd 100644 --- a/src/murmur/Server.cpp +++ b/src/murmur/Server.cpp @@ -123,8 +123,11 @@ Server::Server(int snum, QObject *p) : QThread(p) { } else { #ifdef Q_OS_UNIX int val = 0xe0; - if (setsockopt(sUdpSocket, IPPROTO_IP, IP_TOS, &val, sizeof(val))) - log("Server: Failed to set TOS for UDP Socket"); + if (setsockopt(sUdpSocket, IPPROTO_IP, IP_TOS, &val, sizeof(val))) { + int val = 0x80; + if (setsockopt(sUdpSocket, IPPROTO_IP, IP_TOS, &val, sizeof(val))) + log("Server: Failed to set TOS for UDP Socket"); + } #endif } } diff --git a/src/murmur/UnixMurmur.cpp b/src/murmur/UnixMurmur.cpp index 2d8a149d4..d6fd5d6df 100644 --- a/src/murmur/UnixMurmur.cpp +++ b/src/murmur/UnixMurmur.cpp @@ -227,7 +227,7 @@ void UnixMurmur::setuid() { void UnixMurmur::initialcap() { #ifdef Q_OS_LINUX - cap_value_t caps[] = {CAP_DAC_OVERRIDE, CAP_SYS_NICE, CAP_SYS_RESOURCE, CAP_SETUID, CAP_SETGID }; + cap_value_t caps[] = {CAP_DAC_OVERRIDE, CAP_SYS_NICE, CAP_SYS_RESOURCE, CAP_NET_ADMIN, CAP_SETUID, CAP_SETGID }; if (! bRoot) return; @@ -250,7 +250,7 @@ void UnixMurmur::initialcap() { void UnixMurmur::finalcap() { #ifdef Q_OS_LINUX - cap_value_t caps[] = {CAP_DAC_OVERRIDE, CAP_SYS_NICE }; + cap_value_t caps[] = {CAP_DAC_OVERRIDE, CAP_SYS_NICE, CAP_NET_ADMIN }; if (! bRoot) return; |