diff options
author | Oz Linden <oz@lindenlab.com> | 2017-10-11 09:13:55 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2017-10-11 09:13:55 -0400 |
commit | d62ad1ef8afc1b9abadbc611d373a7a7d9afc368 (patch) | |
tree | 9f14b141e692c3b78eee846f12fc021feacf1de6 /indra/newview/llvoicevivox.cpp | |
parent | c0ac11e24022eb51918e825414f2c04f3085bc61 (diff) | |
parent | b6d22de58850fc9a5b34eeb5b7930e5845bfc42d (diff) |
merge changes for 5.0.8-release
Diffstat (limited to 'indra/newview/llvoicevivox.cpp')
-rw-r--r-- | indra/newview/llvoicevivox.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index fe497ee3be..285ce298b0 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -248,6 +248,7 @@ static bool sMuteListListener_listening = false; /////////////////////////////////////////////////////////////////////////////////////////////// static LLProcessPtr sGatewayPtr; +static LLEventStream sGatewayPump("VivoxDaemonPump", true); static bool isGatewayRunning() { @@ -258,6 +259,7 @@ static void killGateway() { if (sGatewayPtr) { + sGatewayPump.stopListening("VivoxDaemonPump"); sGatewayPtr->kill(); } } @@ -709,6 +711,19 @@ bool LLVivoxVoiceClient::endAndDisconnectSession() return true; } +bool LLVivoxVoiceClient::callbackEndDaemon(const LLSD& data) +{ + if (!LLAppViewer::isExiting()) + { + terminateAudioSession(false); + closeSocket(); + cleanUp(); + LLVoiceClient::getInstance()->setUserPTTState(false); + gAgent.setVoiceConnected(false); + } + sGatewayPump.stopListening("VivoxDaemonPump"); + return false; +} bool LLVivoxVoiceClient::startAndLaunchDaemon() { @@ -779,6 +794,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")); |