From ce83353dbd457165bbecab070ecfbf536a276227 Mon Sep 17 00:00:00 2001 From: Stefan Hacker Date: Sun, 4 Nov 2012 18:06:03 +0100 Subject: [PATCH] Make opustreshold and channelnestinglimit accept zero values in setLiveConf. --- src/murmur/Server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/murmur/Server.cpp b/src/murmur/Server.cpp index 2f44b559a..1f5d70f30 100644 --- a/src/murmur/Server.cpp +++ b/src/murmur/Server.cpp @@ -509,9 +509,9 @@ void Server::setLiveConf(const QString &key, const QString &value) { else if (key == "suggestpushtotalk") qvSuggestPushToTalk = ! v.isNull() ? (v.isEmpty() ? QVariant() : v) : Meta::mp.qvSuggestPushToTalk; else if (key == "opusthreshold") - iOpusThreshold = i ? i : Meta::mp.iOpusThreshold; + iOpusThreshold = (i >= 0) ? qBound(0, i, 100) : Meta::mp.iOpusThreshold; else if (key =="channelnestinglimit") - iChannelNestingLimit = i ? i : Meta::mp.iChannelNestingLimit; + iChannelNestingLimit = (i >= 0) ? i : Meta::mp.iChannelNestingLimit; } #ifdef USE_BONJOUR