diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 7752b4dc311fbe461c3bb51053a4123710a40ebe..dca9dea668f7732a0aa1e67e95eb589fb64ba604 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -407,7 +407,9 @@ void LLVivoxVoiceClient::connectorCreate() << "<ClientName>V2 SDK</ClientName>" << "<AccountManagementServer>" << mVoiceAccountServerURI << "</AccountManagementServer>" << "<Mode>Normal</Mode>" +#ifndef LL_LINUX << "<ConnectorHandle>" << LLVivoxSecurity::getInstance()->connectorHandle() << "</ConnectorHandle>" +#endif << (gSavedSettings.getBOOL("VoiceMultiInstance") ? "<MinimumPort>30000</MinimumPort><MaximumPort>50000</MaximumPort>" : "") << "<Logging>" << "<Folder>" << logpath << "</Folder>" @@ -661,23 +663,24 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() params.args.add(shutdown_timeout); } - // If we allow multiple instances of the viewer to start the voicedaemon - if (gSavedSettings.getBOOL("VoiceMultiInstance")) - { - // Set TEMPORARY random voice port - LLControlVariable* voice_port = gSavedSettings.getControl("VivoxVoicePort"); - if (voice_port) - { - S32 port_nr = 30000 + ll_rand(20000); - voice_port->setValue(LLSD(port_nr), false); - } - // Tell voice gateway to listen to a specific port - params.args.add("-i"); - params.args.add(llformat("127.0.0.1:%u", gSavedSettings.getU32("VivoxVoicePort"))); + // If we allow multiple instances of the viewer to start the voicedaemon + if (gSavedSettings.getBOOL("VoiceMultiInstance")) + { + // Set TEMPORARY random voice port + LLControlVariable* voice_port = gSavedSettings.getControl("VivoxVoicePort"); + if (voice_port) + { + S32 port_nr = 30000 + ll_rand(20000); + voice_port->setValue(LLSD(port_nr), false); + } + // Tell voice gateway to listen to a specific port + params.args.add("-i"); + params.args.add(llformat("127.0.0.1:%u", gSavedSettings.getU32("VivoxVoicePort"))); } params.cwd = gDirUtilp->getAppRODataDir(); +#ifndef LL_LINUX # ifdef VIVOX_HANDLE_ARGS params.args.add("-ah"); params.args.add(LLVivoxSecurity::getInstance()->accountHandle()); @@ -685,6 +688,7 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon() params.args.add("-ch"); params.args.add(LLVivoxSecurity::getInstance()->connectorHandle()); # endif // VIVOX_HANDLE_ARGS +#endif sGatewayPtr = LLProcess::create(params); @@ -1850,7 +1854,9 @@ void LLVivoxVoiceClient::loginSendMessage() << "<ConnectorHandle>" << LLVivoxSecurity::getInstance()->connectorHandle() << "</ConnectorHandle>" << "<AccountName>" << mAccountName << "</AccountName>" << "<AccountPassword>" << mAccountPassword << "</AccountPassword>" +#ifndef LL_LINUX << "<AccountHandle>" << LLVivoxSecurity::getInstance()->accountHandle() << "</AccountHandle>" +#endif << "<AudioSessionAnswerMode>VerifyAnswer</AudioSessionAnswerMode>" << "<EnableBuddiesAndPresence>false</EnableBuddiesAndPresence>" << "<EnablePresencePersistence>0</EnablePresencePersistence>" @@ -2835,6 +2841,7 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st } else { +#ifndef LL_LINUX // Connector created, move forward. if (connectorHandle == LLVivoxSecurity::getInstance()->connectorHandle()) { @@ -2853,6 +2860,15 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st << LL_ENDL; result["connector"] = LLSD::Boolean(false); } +#else + LL_INFOS("Voice") << "Connector.Create succeeded, Vivox SDK version is " << versionID << LL_ENDL; + mVoiceVersion.serverVersion = versionID; + LLVivoxSecurity::getInstance()->setConnectorHandle(connectorHandle); + mConnectorEstablished = true; + mTerminateDaemon = false; + + result["connector"] = LLSD::Boolean(true); +#endif } LLEventPumps::instance().post("vivoxClientPump", result); @@ -2880,6 +2896,9 @@ void LLVivoxVoiceClient::loginResponse(int statusCode, std::string &statusString else { // Login succeeded, move forward. +#ifdef LL_LINUX + LLVivoxSecurity::getInstance()->setAccountHandle(accountHandle); +#endif mAccountLoggedIn = true; mNumberOfAliases = numberOfAliases; result["login"] = LLSD::String("response_ok"); diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index e02301b136e13057802a337c2899b3a20f6a12a0..b28dd507bb635b87b0ae65cbed75e559b1696f70 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -1032,6 +1032,11 @@ class LLVivoxSecurity : public LLSingleton<LLVivoxSecurity> std::string connectorHandle() { return mConnectorHandle; }; std::string accountHandle() { return mAccountHandle; }; +#ifdef LL_LINUX + void setConnectorHandle(const std::string& handle) { mConnectorHandle = handle; } + void setAccountHandle(const std::string& handle) { mAccountHandle = handle; } +#endif + private: std::string mConnectorHandle; std::string mAccountHandle;