From 5ec9e0ea1673a7a6e3c0f1b0d9c51e6e8e578722 Mon Sep 17 00:00:00 2001 From: jrd Date: Tue, 26 May 2026 19:26:30 +0000 Subject: [PATCH] fix: GetConCliParam skips channels not yet identified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A channel becomes IsConnected() as soon as the first UDP audio packet arrives, but bIsIdentified is only set true once SetChanInfo() is called after the client's CHANNEL_INFO protocol message is received — one round-trip later (typically 20–200 ms). During that window GetConCliParam (used by getClients RPC and the GUI connected-clients list) returns a default-constructed CChannelCoreInfo with empty name, AnyCountry, and instrument 0 for the joining channel. Add IsIdentified() getter and gate GetConCliParam on both IsConnected() and IsIdentified(), matching the existing gate in PrepAndSendPacket that already withholds audio from unidentified channels. --- src/channel.h | 1 + src/server.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/channel.h b/src/channel.h index 096a88c9e9..ff813aca82 100644 --- a/src/channel.h +++ b/src/channel.h @@ -78,6 +78,7 @@ class CChannel : public QObject void ResetTimeOutCounter() { iConTimeOut = iConTimeOutStartVal; } bool IsConnected() const { return iConTimeOut > 0; } + bool IsIdentified() const { return bIsIdentified; } void Disconnect(); void SetEnable ( const bool bNEnStat ); diff --git a/src/server.cpp b/src/server.cpp index d6cd2bf0cc..f3e71887a6 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1533,7 +1533,7 @@ void CServer::GetConCliParam ( CVector& vecHostAddresses, // check all possible channels for ( int i = 0; i < iMaxNumChannels; i++ ) { - if ( vecChannels[i].IsConnected() ) + if ( vecChannels[i].IsConnected() && vecChannels[i].IsIdentified() ) { // get requested data vecHostAddresses[i] = vecChannels[i].GetAddress();