diff options
author | Robert Adam <dev@robert-adam.de> | 2021-12-14 12:53:57 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2022-03-27 10:49:59 +0300 |
commit | 7d4dcd168d94e18ea30c5d080615459a4165c5d6 (patch) | |
tree | d78fc140bef3f1e5f6371af6d05b8cb0a39033d6 /src | |
parent | 1017dab5c2f514841cba173c48092b2a01bf002c (diff) |
REFAC(server): Removed dead code msgUDPTunnel
This message type is explicitly handled before calling into the
different msg* implementations. Therefore, msgUDPTunnel could never be
called in the current state of the code base.
However, we can't remove the implementation completely, because of the
macro voodoo that is used to declare and switch over the different
message types (we can't remove the entry from the macro, since in there
we still need it for defining the respective enum entry).
Diffstat (limited to 'src')
-rw-r--r-- | src/murmur/Messages.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp index 352fbcc0e..feff38a76 100644 --- a/src/murmur/Messages.cpp +++ b/src/murmur/Messages.cpp @@ -635,23 +635,10 @@ void Server::msgServerSync(ServerUser *, MumbleProto::ServerSync &) { void Server::msgPermissionDenied(ServerUser *, MumbleProto::PermissionDenied &) { } -void Server::msgUDPTunnel(ServerUser *uSource, MumbleProto::UDPTunnel &msg) { - ZoneScoped; - - MSG_SETUP_NO_UNIDLE(ServerUser::Authenticated); - - const std::string &str = msg.packet(); - int len = static_cast< int >(str.length()); - if (len < 1) - return; - QReadLocker rl(&qrwlVoiceThread); - if (m_tcpTunnelDecoder.decode(gsl::span< const Mumble::Protocol::byte >( - reinterpret_cast< const Mumble::Protocol::byte * >(str.data()), str.size())) - && m_tcpTunnelDecoder.getMessageType() == Mumble::Protocol::UDPMessageType::Audio) { - Mumble::Protocol::AudioData audioData = m_tcpTunnelDecoder.getAudioData(); - - processMsg(uSource, audioData, m_tcpAudioReceivers, m_tcpAudioEncoder); - } +void Server::msgUDPTunnel(ServerUser *, MumbleProto::UDPTunnel &) { + // This code should be unreachable + assert(false); + qWarning("Messages: Reached theoretically unreachable function msgUDPTunnel"); } void Server::msgUserState(ServerUser *uSource, MumbleProto::UserState &msg) { |