summaryrefslogtreecommitdiff
path: root/indra/newview/llvoicevivox.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2017-06-30 19:19:09 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2017-06-30 19:19:09 +0300
commit5a10be34df879fb9ae659ed8eabf3db0751b2819 (patch)
treeaedae9be518ab16c736889339aeb4f83d390fc52 /indra/newview/llvoicevivox.cpp
parent0c19b16266df155b4fc288c5e6671fe4382548f0 (diff)
MAINT-142 Fixed Speak button remains enabled in case of SLVoice process termination
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r--indra/newview/llvoicevivox.cpp14
1 files changed, 14 insertions, 0 deletions
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"));