summaryrefslogtreecommitdiff
path: root/indra
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
parent0c19b16266df155b4fc288c5e6671fe4382548f0 (diff)
MAINT-142 Fixed Speak button remains enabled in case of SLVoice process termination
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoicevivox.cpp14
-rw-r--r--indra/newview/llvoicevivox.h1
2 files changed, 15 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"));
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();