From f9c587535035b3a945edcff4ac09ab22ec4dbde2 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 13 Aug 2021 22:45:33 +0300 Subject: [PATCH 1/7] SL-15292 waitForChannel crash This code needs to be turned into a state machine (switch-case between states) with clean exit and each state clean and separate. Right now it passes through all stages on exit and relies onto multiple bools instead of just transitioning to 'exit' state. In some cases coroutine still lives longer than voice singletone, it also needs to be adressed. --- indra/newview/llvoicevivox.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index e4d528ece5..e6da5c5939 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1880,13 +1880,22 @@ bool LLVivoxVoiceClient::waitForChannel() break; } - } while (mVoiceEnabled && !mRelogRequested && !sShuttingDown); + } while (!sShuttingDown && mVoiceEnabled && !mRelogRequested); - LL_DEBUGS("Voice") - << "leaving inner waitForChannel loop" - << " RelogRequested=" << mRelogRequested - << " VoiceEnabled=" << mVoiceEnabled - << LL_ENDL; + if (!sShuttingDown) + { + LL_DEBUGS("Voice") + << "leaving inner waitForChannel loop" + << " RelogRequested=" << mRelogRequested + << " VoiceEnabled=" << mVoiceEnabled + << LL_ENDL; + } + else + { + // if sShuttingDown is set, we already logged out + LL_DEBUGS("Voice") << "leaving inner waitForChannel loop." << LL_ENDL; + return false; + } mIsProcessingChannels = false; @@ -1902,7 +1911,7 @@ bool LLVivoxVoiceClient::waitForChannel() return false; } } - } while (mVoiceEnabled && mRelogRequested && isGatewayRunning() && !sShuttingDown); + } while (!sShuttingDown && mVoiceEnabled && mRelogRequested && isGatewayRunning()); LL_DEBUGS("Voice") << "exiting" From 76da77d2a94dae56a1f784ae1988d2193284a057 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Fri, 13 Aug 2021 23:37:31 +0300 Subject: [PATCH 2/7] SL-15588 Updated llphysicsextensions_tpv to codeticket version 562599 --- autobuild.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index c4a7c9c7c3..1d05c60d2c 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2321,9 +2321,9 @@ archive hash - 2aa4ec0d72bbe4b755730f1bf92b39e7 + f09066891d5a52add50bdb14efdc86f6 url - http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/30340/257304/llphysicsextensions_tpv-1.0.542327-darwin64-542327.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/84729/788142/llphysicsextensions_tpv-1.0.561752-darwin64-561752.tar.bz2 name darwin64 @@ -2345,9 +2345,9 @@ archive hash - ad9aba5e2c43a37b6530a0d2de64df1c + 60e399f707bca32d0a4f7ee33ac4c35b url - http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/30341/257307/llphysicsextensions_tpv-1.0.542327-windows-542327.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/84730/788138/llphysicsextensions_tpv-1.0.561752-windows-561752.tar.bz2 name windows @@ -2357,16 +2357,16 @@ archive hash - 46689ff1442a8eccac3a7f3258308e1e + a43e360236e7c17b5823f91e4c349e60 url - http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/30341/257307/llphysicsextensions_tpv-1.0.542327-windows64-542327.tar.bz2 + https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/84731/788139/llphysicsextensions_tpv-1.0.561752-windows64-561752.tar.bz2 name windows version - 1.0.542327 + 1.0.561752 mesa From 79c827c176d771a4b27550e92d4da62774124891 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 19 Aug 2021 04:29:56 +0300 Subject: [PATCH 3/7] SL-15853 Added the Map icon to bottom toolbar defaults --- indra/newview/app_settings/toolbars.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml index eec0d81e8b..f3a23edc58 100644 --- a/indra/newview/app_settings/toolbars.xml +++ b/indra/newview/app_settings/toolbars.xml @@ -7,6 +7,7 @@ + From 9a01ea42356763bbd881fea2506dc64a62adc16d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 31 Aug 2021 21:50:14 +0300 Subject: [PATCH 4/7] SL-15768 Restored collision sound default behaviour --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 96d8a548c8..5bbf1a7b44 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3746,7 +3746,7 @@ Type Boolean Value - 0 + 1 EnableMouselook From 69fd209c83f7c5602ec47feb674a15b268c80097 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 31 Aug 2021 22:27:45 +0300 Subject: [PATCH 5/7] SL-13313 Updated message_template.msg.sha1 --- scripts/messages/message_template.msg.sha1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1 index bf45b08f93..4712a03e8d 100755 --- a/scripts/messages/message_template.msg.sha1 +++ b/scripts/messages/message_template.msg.sha1 @@ -1 +1 @@ -be964beb7a2cd060a438c89fd5cb25e2f687d45e \ No newline at end of file +dddb11f7e45f1779ff536819f36a20e63d572ba8 \ No newline at end of file From ecf819b38be28ed5a417d9fedf5b2f2e0776a373 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Wed, 1 Sep 2021 20:48:11 +0300 Subject: [PATCH 6/7] DRTVWR-521 Updated llca to codeticket build 563493 --- autobuild.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 1d05c60d2c..a7a7036680 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2187,18 +2187,18 @@ archive hash - 106d16623ee9a580b20777e8072a08cb + 35f42f538f4dc3abdfc2b2c4a915d004 hash_algorithm md5 url - https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/82745/775330/llca-202106010215.560271-common-560271.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87228/802959/llca-202109010216.563493-common-563493.tar.bz2 name common version - 202106010215.560271 + 202109010216.563493 llphysicsextensions_source From b12dd38c57fd9b047382e6e2d80b26f36888eb39 Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Thu, 26 Aug 2021 15:55:30 -0700 Subject: [PATCH 7/7] SL-15867 User not logged in - very much the MVS (minimum viable solution) but by storing the OpenID cookie when it arrives then injecting it forcefully into each new media instance, it appears that the 'not logged in' problem is solved - at least in my testing, 20+ times logging in without a cache and profiles, dashboard etc. were all logged in - QA will confirm. The full solution involves providing a separate cache for each media instance and tightening up the CEF cookie calling code - that is a large project and this is sufficient for now --- indra/llplugin/llpluginclassmedia.cpp | 60 +++++++++++++++++++++++++++ indra/llplugin/llpluginclassmedia.h | 14 +++++++ indra/newview/llviewermedia.cpp | 9 +++- 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 6d51adc685..a436452461 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -690,6 +690,66 @@ bool LLPluginClassMedia::textInput(const std::string &text, MASK modifiers, LLSD return true; } +// This function injects a previously stored OpenID cookie into +// each new media instance - see SL-15867 for details. It appears +// that the way we use the cache, shared between multiple CEF +// instances means that sometimes the OpenID cookie cannot be read +// even though it appears to be there. The long term solution to +// this is to create a separate cache directory for each instance +// but that has its own set of problems. This short term approach +// "forces" each new media instance to have a copy of the cookie +// so that a page that needs it - e.g. Profiles - finds it and +// can log in successfully. +void LLPluginClassMedia::injectOpenIDCookie() +{ + // can be called before we know who the user is at login + // and there is no OpenID cookie at that point so no + // need to try to set it (these values will all be empty) + if (sOIDcookieName.length() && sOIDcookieValue.length()) + { + setCookie(sOIDcookieUrl, sOIDcookieName, + sOIDcookieValue, sOIDcookieHost, sOIDcookiePath, sOIDcookieHttpOnly, sOIDcookieSecure); + } +} + +// We store each component of the OpenI cookie individuality here +// because previously, there was some significant parsing to +// break up the raw string into these components and we do not +// want to have to do that again here. Stored as statics because +// we want to share their value between all instances of this +// class - the ones that receive it at login and any others +// that open afterwards (e.g. the Profiles floater) +std::string LLPluginClassMedia::sOIDcookieUrl = std::string(); +std::string LLPluginClassMedia::sOIDcookieName = std::string(); +std::string LLPluginClassMedia::sOIDcookieValue = std::string(); +std::string LLPluginClassMedia::sOIDcookieHost = std::string(); +std::string LLPluginClassMedia::sOIDcookiePath = std::string(); +bool LLPluginClassMedia::sOIDcookieHttpOnly = false; +bool LLPluginClassMedia::sOIDcookieSecure = false; + +// Once we receive the OpenID cookie, it is parsed/processed +// in llViewerMedia::parseRawCookie() and then the component +// values are stored here so that next time a new media +// instance is created, we can use injectOpenIDCookie() +// to "insist" that the cookie store remember its value. +// One might ask why we need to go via LLViewerMedia (which +// makes this call) - this is because the raw cookie arrives +// here in this file but undergoes non-trivial processing +// in LLViewerMedia. +void LLPluginClassMedia::storeOpenIDCookie(const std::string url, + const std::string name, const std::string value, + const std::string host, const std::string path, + bool httponly, bool secure) +{ + sOIDcookieUrl = url; + sOIDcookieName = name; + sOIDcookieValue = value; + sOIDcookieHost = host; + sOIDcookiePath = path; + sOIDcookieHttpOnly = httponly; + sOIDcookieSecure = secure; +} + void LLPluginClassMedia::setCookie(std::string uri, std::string name, std::string value, std::string domain, std::string path, bool httponly, bool secure) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_cookie"); diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 382f891e0c..a09145cf50 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -135,6 +135,20 @@ public: // Text may be unicode (utf8 encoded) bool textInput(const std::string &text, MASK modifiers, LLSD native_key_data); + static std::string sOIDcookieUrl; + static std::string sOIDcookieName; + static std::string sOIDcookieValue; + static std::string sOIDcookieHost; + static std::string sOIDcookiePath; + static bool sOIDcookieHttpOnly; + static bool sOIDcookieSecure; + void storeOpenIDCookie(const std::string url, + const std::string name, const std::string value, + const std::string host, const std::string path, + bool httponly, bool secure); + + void injectOpenIDCookie(); + void setCookie(std::string uri, std::string name, std::string value, std::string domain, std::string path, bool httponly, bool secure); void loadURI(const std::string &uri); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index d35dbda907..d0cf8ea407 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1290,7 +1290,13 @@ void LLViewerMedia::getOpenIDCookieCoro(std::string url) // down. std::string cefUrl(std::string(inst->mOpenIDURL.mURI) + "://" + std::string(inst->mOpenIDURL.mAuthority)); - media_instance->getMediaPlugin()->setCookie(cefUrl, cookie_name, cookie_value, cookie_host, cookie_path, httponly, secure); + media_instance->getMediaPlugin()->setCookie(cefUrl, cookie_name, cookie_value, cookie_host, + cookie_path, httponly, secure); + + // Now that we have parsed the raw cookie, we must store it so that each new media instance + // can also get a copy and faciliate logging into internal SL sites. + media_instance->getMediaPlugin()->storeOpenIDCookie(cefUrl, cookie_name, cookie_value, + cookie_host, cookie_path, httponly, secure); } } } @@ -1825,6 +1831,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) if (media_source) { + media_source->injectOpenIDCookie(); media_source->setDisableTimeout(gSavedSettings.getBOOL("DebugPluginDisableTimeout")); media_source->setLoop(mMediaLoop); media_source->setAutoScale(mMediaAutoScale);