From 5a10be34df879fb9ae659ed8eabf3db0751b2819 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 30 Jun 2017 19:19:09 +0300 Subject: MAINT-142 Fixed Speak button remains enabled in case of SLVoice process termination --- indra/newview/llvoicevivox.cpp | 14 ++++++++++++++ indra/newview/llvoicevivox.h | 1 + 2 files changed, 15 insertions(+) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 189ed54993..6a91f26b0b 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -153,6 +153,7 @@ static bool sMuteListListener_listening = false; /////////////////////////////////////////////////////////////////////////////////////////////// static LLProcessPtr sGatewayPtr; +static LLEventStream sGatewayPump("VivoxDaemonPump", true); static bool isGatewayRunning() { @@ -599,6 +600,16 @@ bool LLVivoxVoiceClient::endAndDisconnectSession() return true; } +bool LLVivoxVoiceClient::callbackEndDaemon(const LLSD& data) +{ + terminateAudioSession(false); + closeSocket(); + cleanUp(); + LLVoiceClient::getInstance()->setUserPTTState(false); + gAgent.setVoiceConnected(false); + sGatewayPump.stopListening("VivoxDaemonPump"); + return false; +} bool LLVivoxVoiceClient::startAndLaunchDaemon() { @@ -670,6 +681,9 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() params.args.add(LLVivoxSecurity::getInstance()->connectorHandle()); # endif // VIVOX_HANDLE_ARGS + params.postend = sGatewayPump.getName(); + sGatewayPump.listen("VivoxDaemonPump", boost::bind(&LLVivoxVoiceClient::callbackEndDaemon, this, _1)); + sGatewayPtr = LLProcess::create(params); mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost").c_str(), gSavedSettings.getU32("VivoxVoicePort")); diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 81e924e438..c7ce92fff5 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -623,6 +623,7 @@ private: bool startAndConnectSession(); bool endAndDisconnectSession(); + bool callbackEndDaemon(const LLSD& data); bool startAndLaunchDaemon(); bool provisionVoiceAccount(); bool establishVoiceConnection(); -- cgit v1.2.3