From 89482e614a337069905a4f77300e280b3e19fe9e Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sun, 25 Dec 2011 13:15:21 +0100 Subject: disable voice if ParcelVoiceInfoRequest response is malformed. Seen (empty LLSD) in OSGrid Mumble Sandbox. Without a "voice_credentials" key the client never connects to the server, but would retry in vain to do so. Note to OpenSim devs: the "channel_uri" of the ParcelVoiceInfoRequest response is parsed to identify if we are connecting to a mumble server on parcel change. The presence of "sip:" within the uri is interpreted as connecting to vivox/freeswitch, the absence as connecting to a mumble server. However it would be much better to add a "server_type" key to the response, which could hold a string like "mumble", "freeswitch", etc - the absence would indicate connecting to a legacy(like) voice server. Additional note: to detect a mumble server also of the VoiceAccountProvision response the voice_account_server_uri is parsed: If the uri starts with tcp:// the "mumble" client is loaded(by default, you can change it in the "VoiceModuleMumble" debug setting), for any other scheme "SLVoice" (default, "VoiceModuleVivox" debug setting). --- linden/indra/newview/llvoiceclient.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'linden/indra') diff --git a/linden/indra/newview/llvoiceclient.cpp b/linden/indra/newview/llvoiceclient.cpp index 07d2fa9..3cf15fc 100644 --- a/linden/indra/newview/llvoiceclient.cpp +++ b/linden/indra/newview/llvoiceclient.cpp @@ -1051,6 +1051,11 @@ void LLVoiceClientCapResponder::result(const LLSD& content) gVoiceClient->setSpatialChannel(uri, credentials, mResponseID); } + else + { + llwarns << "ParcelVoiceInfoRequest response malformed, disabling voice." << llendl; + gVoiceClient->close(); + } } @@ -1771,11 +1776,13 @@ void LLVoiceClient::close() { LL_DEBUGS("VoiceSession") << "Cancel Session: LLVoiceClient::close() called." << llendl; + mAccountActive = false; setState(stateDisableCleanup); } void LLVoiceClient::start() { + mAccountActive = true; setState(stateStart); } @@ -7207,6 +7214,11 @@ class LLViewerParcelVoiceInfo : public LLHTTPNode gVoiceClient->setPIRCapResponseID(response_id); gVoiceClient->setSpatialChannel(uri, credentials, response_id); } + else + { + llwarns << "ParcelVoiceInfoRequest response malformed, disabling voice." << llendl; + gVoiceClient->close(); + } } } }; -- cgit v1.1