From 652ec2feeeb39c5c7ec9553563e3fdc29c66780d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 19 Jul 2013 17:47:58 -0700 Subject: ACME-734 : Suppress the green https experiment, prevent logging urls when skipping history, allow temporary url for display purposes --- indra/newview/llviewermedia.cpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 2df028de69..8a88a36dda 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -361,6 +361,7 @@ static bool sAnyMediaShowing = false; static boost::signals2::connection sTeleportFinishConnection; static std::string sUpdatedCookies; static const char *PLUGIN_COOKIE_FILE_NAME = "plugin_cookies.txt"; +static bool sLogURL = true; ////////////////////////////////////////////////////////////////////////////////////////// static void add_media_impl(LLViewerMediaImpl* media) @@ -1622,6 +1623,13 @@ void LLViewerMedia::setOnlyAudibleMediaTextureID(const LLUUID& texture_id) sForceUpdate = true; } +////////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::setLogURL(bool do_log) +{ + sLogURL = do_log; +} + ////////////////////////////////////////////////////////////////////////////////////////// // LLViewerMediaImpl ////////////////////////////////////////////////////////////////////////////////////////// @@ -2000,7 +2008,10 @@ void LLViewerMediaImpl::loadURI() "<>#%" ";/?:@&=", false); - llinfos << "Asking media source to load URI: " << uri << llendl; + if (sLogURL) + { + llinfos << "Asking media source to load URI: " << uri << llendl; + } mMediaSource->loadURI( uri ); @@ -2567,7 +2578,10 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED) { // Helpful to have media urls in log file. Shouldn't be spammy. - llinfos << "NOT LOADING media id= " << mTextureId << " url=" << url << " mime_type=" << mime_type << llendl; + if (sLogURL) + { + llinfos << "NOT LOADING media id= " << mTextureId << " url=" << url << " mime_type=" << mime_type << llendl; + } // This impl should not be loaded at this time. LL_DEBUGS("PluginPriority") << this << "Not loading (PRIORITY_UNLOADED)" << LL_ENDL; @@ -2582,7 +2596,10 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi void LLViewerMediaImpl::navigateInternal() { // Helpful to have media urls in log file. Shouldn't be spammy. - llinfos << "media id= " << mTextureId << " url=" << mMediaURL << " mime_type=" << mMimeType << llendl; + if (sLogURL) + { + llinfos << "media id= " << mTextureId << " url=" << mMediaURL << " mime_type=" << mMimeType << llendl; + } if(mNavigateSuspended) { -- cgit v1.2.3 From 9b5104b3b5f608dbc9f06596885bdab9878f4065 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 19 Jul 2013 19:32:53 -0700 Subject: ACME-734 : Fix : Continue to log but just skip the query parts --- indra/newview/llviewermedia.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 8a88a36dda..6453e2348f 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -361,7 +361,6 @@ static bool sAnyMediaShowing = false; static boost::signals2::connection sTeleportFinishConnection; static std::string sUpdatedCookies; static const char *PLUGIN_COOKIE_FILE_NAME = "plugin_cookies.txt"; -static bool sLogURL = true; ////////////////////////////////////////////////////////////////////////////////////////// static void add_media_impl(LLViewerMediaImpl* media) @@ -1623,13 +1622,6 @@ void LLViewerMedia::setOnlyAudibleMediaTextureID(const LLUUID& texture_id) sForceUpdate = true; } -////////////////////////////////////////////////////////////////////////////////////////// -// static -void LLViewerMedia::setLogURL(bool do_log) -{ - sLogURL = do_log; -} - ////////////////////////////////////////////////////////////////////////////////////////// // LLViewerMediaImpl ////////////////////////////////////////////////////////////////////////////////////////// @@ -2008,9 +2000,10 @@ void LLViewerMediaImpl::loadURI() "<>#%" ";/?:@&=", false); - if (sLogURL) { - llinfos << "Asking media source to load URI: " << uri << llendl; + // Do not log the query parts + LLURI u(uri); + llinfos << "Asking media source to load URI: " << u.scheme() << "://" << u.authority() << u.path() << llendl; } mMediaSource->loadURI( uri ); @@ -2578,9 +2571,10 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED) { // Helpful to have media urls in log file. Shouldn't be spammy. - if (sLogURL) { - llinfos << "NOT LOADING media id= " << mTextureId << " url=" << url << " mime_type=" << mime_type << llendl; + // Do not log the query parts + LLURI u(url); + llinfos << "NOT LOADING media id= " << mTextureId << " url=" << u.scheme() << "://" << u.authority() << u.path() << " mime_type=" << mime_type << llendl; } // This impl should not be loaded at this time. @@ -2596,9 +2590,10 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi void LLViewerMediaImpl::navigateInternal() { // Helpful to have media urls in log file. Shouldn't be spammy. - if (sLogURL) { - llinfos << "media id= " << mTextureId << " url=" << mMediaURL << " mime_type=" << mMimeType << llendl; + // Do not log the query parts + LLURI u(mMediaURL); + llinfos << "media id= " << mTextureId << " url=" << u.scheme() << "://" << u.authority() << u.path() << " mime_type=" << mMimeType << llendl; } if(mNavigateSuspended) -- cgit v1.2.3 From 56038ded5192cfae5217ae6eae7480923b9298e5 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 25 Jul 2013 19:35:10 -0700 Subject: ACME-745 : Fix : Do not oversanitize the logged URLs... --- indra/newview/llviewermedia.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 6453e2348f..13483790ed 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -2003,7 +2003,8 @@ void LLViewerMediaImpl::loadURI() { // Do not log the query parts LLURI u(uri); - llinfos << "Asking media source to load URI: " << u.scheme() << "://" << u.authority() << u.path() << llendl; + std::string sanitized_uri = (u.query().empty() ? uri : u.scheme() + "://" + u.authority() + u.path()); + llinfos << "Asking media source to load URI: " << sanitized_uri << llendl; } mMediaSource->loadURI( uri ); @@ -2574,7 +2575,8 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi { // Do not log the query parts LLURI u(url); - llinfos << "NOT LOADING media id= " << mTextureId << " url=" << u.scheme() << "://" << u.authority() << u.path() << " mime_type=" << mime_type << llendl; + std::string sanitized_url = (u.query().empty() ? url : u.scheme() + "://" + u.authority() + u.path()); + llinfos << "NOT LOADING media id= " << mTextureId << " url=" << sanitized_url << ", mime_type=" << mime_type << llendl; } // This impl should not be loaded at this time. @@ -2593,7 +2595,8 @@ void LLViewerMediaImpl::navigateInternal() { // Do not log the query parts LLURI u(mMediaURL); - llinfos << "media id= " << mTextureId << " url=" << u.scheme() << "://" << u.authority() << u.path() << " mime_type=" << mMimeType << llendl; + std::string sanitized_url = (u.query().empty() ? mMediaURL : u.scheme() + "://" + u.authority() + u.path()); + llinfos << "media id= " << mTextureId << " url=" << sanitized_url << ", mime_type=" << mMimeType << llendl; } if(mNavigateSuspended) -- cgit v1.2.3 From 63cc379c72e3f30a6e45c4b81c5a2e7078be0f1e Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Fri, 4 Oct 2013 02:50:50 +0300 Subject: MAINT-3270 FIXED crash in LLControlCache::LLControlCache: Control named RenderAutoMuteFunctionsnot found --- indra/newview/llviewermedia.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermedia.cpp') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 2df028de69..fd98e0fd3e 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3758,18 +3758,18 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const // If it is attached to an avatar and the pref is off, we shouldn't show it if (attached_to_another_avatar) { - static LLCachedControl show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING); + static LLCachedControl show_media_on_others(gSavedSettings, LLViewerMedia::SHOW_MEDIA_ON_OTHERS_SETTING, false); return show_media_on_others; } if (inside_parcel) { - static LLCachedControl show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING); + static LLCachedControl show_media_within_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_WITHIN_PARCEL_SETTING, true); return show_media_within_parcel; } else { - static LLCachedControl show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING); + static LLCachedControl show_media_outside_parcel(gSavedSettings, LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING, true); return show_media_outside_parcel; } -- cgit v1.2.3