From 96e0c823412cc0419a730714992b4fc25316deb0 Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Wed, 22 Dec 2021 15:10:50 -0800 Subject: Show both server/voice versions only if mismatched. Otherwise show the longer one. --- indra/newview/llappviewer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4cc5ae7630..58a164f1d0 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3209,9 +3209,18 @@ LLSD LLAppViewer::getViewerInfo() const if(LLVoiceClient::getInstance()->voiceEnabled()) { auto& licenseInfo(LLLicenseInfo::instance()); + std::string detailed_version = licenseInfo.getVersion("slvoice"); LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion(); std::ostringstream version_string; - version_string << version.serverType << " " << version.serverVersion << " SLVoice " << licenseInfo.getVersion("slvoice") << std::endl; + if (std::equal(detailed_version.begin(), detailed_version.begin() + version.serverVersion.size(), + version.serverVersion.begin())) + { // Normal case: Show type and detailed version. + version_string << version.serverType << " " << detailed_version << std::endl; + } + else + { // Mismatch: Show both versions. + version_string << version.serverVersion << "/" << detailed_version << std::endl; + } info["VOICE_VERSION"] = version_string.str(); } else -- cgit v1.2.3