From 5ffc066e63a372ad908aa85073004dfc782f0613 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 12 Oct 2016 14:14:44 +0200 Subject: [PATCH 01/14] Add back Firestorm tag that went missing --- indra/newview/llappviewer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4d56201534..2d6e013496 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1430,8 +1430,10 @@ bool LLAppViewer::init() LLVoiceChannel::initClass(); LLVoiceClient::getInstance()->init(gServicePump); + // [FS communication UI] // LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLFloaterIMContainer::onCurrentChannelChanged, _1), true); LLVoiceChannel::setCurrentVoiceChannelChangedCallback( boost::bind( &FSFloaterVoiceControls::sOnCurrentChannelChanged, _1 ), true ); + // [FS communication UI] joystick = LLViewerJoystick::getInstance(); joystick->setNeedsReset(true); From 6b95b76a6303d2b40c62865cc41966524a72661d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 12 Oct 2016 14:19:12 +0200 Subject: [PATCH 02/14] Wrap Flickr connection/upload timeout into a constant --- indra/newview/exoflickr.cpp | 3 ++- indra/newview/llflickrconnect.cpp | 2 +- indra/newview/llflickrconnect.h | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/exoflickr.cpp b/indra/newview/exoflickr.cpp index f108acb4b0..75e98b9938 100644 --- a/indra/newview/exoflickr.cpp +++ b/indra/newview/exoflickr.cpp @@ -29,6 +29,7 @@ #include "llbase64.h" #include "llcorehttputil.h" #include "llsdutil.h" +#include "llflickrconnect.h" // third-party #if LL_USESYSTEMLIBS @@ -293,7 +294,7 @@ void exoFlickr::uploadPhoto(const LLSD& args, LLImageFormatted *image, response_ pHeader->append("Content-Type", "multipart/form-data; boundary=" + boundary); options->setWantHeaders(true); options->setRetries(0); - options->setTimeout(600); + options->setTimeout(FLICKR_CONNECT_TIMEOUT); FSCoreHttpUtil::callbackHttpPostRaw(UPLOAD_URL, post_data, boost::bind( exoFlickrUploadResponse, _1, callback ), boost::bind( exoFlickrUploadResponse, _1, callback ), pHeader, options ); } diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index 34ebf2421b..20abe6199b 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -192,7 +192,7 @@ void LLFlickrConnect::flickrShareImageCoro(LLPointer image, st httpOpts->setFollowRedirects(false); // FIRE-20026: Pictures might get uploaded multiple times after a timeout occurs httpOpts->setRetries(0); - httpOpts->setTimeout(600); + httpOpts->setTimeout(FLICKR_CONNECT_TIMEOUT); // std::string imageFormat; diff --git a/indra/newview/llflickrconnect.h b/indra/newview/llflickrconnect.h index 0155804da0..b8af23f609 100644 --- a/indra/newview/llflickrconnect.h +++ b/indra/newview/llflickrconnect.h @@ -35,6 +35,9 @@ class LLEventPump; +// Connection/upload timeout for Flickr +const U32 FLICKR_CONNECT_TIMEOUT = 600; + /** * @class LLFlickrConnect * From 922e7039a01e5f50fa3cb4b46eb72994167f3ba7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 12 Oct 2016 15:42:45 +0200 Subject: [PATCH 03/14] Fix rare crash in LLAgent::sendAnimationRequests(); found by Henri Beauchamp (Cool VL) --- indra/newview/llagent.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 35131ad2b1..63fe792dc3 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3581,6 +3581,12 @@ void LLAgent::sendAnimationRequests(const std::vector &anim_ids, EAnimRe { sendReliableMessage(); } + // Crash fix by Henri Beauchamp + else + { + msg->clearMessage(); + } + // } void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request) From 477c3f1601178322bd3bb7ee7eae029bd600996e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 13 Oct 2016 10:17:46 +0200 Subject: [PATCH 04/14] Fix log getting spammed with experience requests from other grids --- indra/llmessage/llexperiencecache.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 779d1d9d99..dc5672e043 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -36,6 +36,7 @@ #include #include #include +#include "../newview/llviewernetwork.h" // Log getting spammed with experience requests from other grids; Yes, it IS ugly! //========================================================================= namespace LLExperienceCacheImpl @@ -98,7 +99,12 @@ LLExperienceCache::~LLExperienceCache() void LLExperienceCache::initSingleton() { - mCacheFileName = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "experience_cache.xml"); + // Log getting spammed with experience requests from other grids + //mCacheFileName = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "experience_cache.xml"); + const std::string grid_id_str = LLDir::getScrubbedFileName(LLGridManager::getInstance()->getGridId()); + const std::string& grid_id_lower = utf8str_tolower(grid_id_str); + mCacheFileName = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "experience_cache." + grid_id_lower + ".xml"); + // LL_INFOS("ExperienceCache") << "Loading " << mCacheFileName << LL_ENDL; llifstream cache_stream(mCacheFileName.c_str()); From 8b9d7e86bcd39ad02d181f8c92c326fdc4378750 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 13 Oct 2016 15:29:50 +0200 Subject: [PATCH 05/14] FIRE-19540: Add option to log auto-accepted inventory to nearby chat --- indra/newview/app_settings/settings.xml | 11 ++++++ indra/newview/llviewermessage.cpp | 37 +++++++++++++++++++ .../skins/default/xui/de/notifications.xml | 4 +- .../xui/de/panel_preferences_privacy.xml | 1 + .../newview/skins/default/xui/de/strings.xml | 5 +++ .../xui/en/panel_preferences_privacy.xml | 11 ++++++ .../newview/skins/default/xui/en/strings.xml | 2 + 7 files changed, 69 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f6f5540403..16301f52ac 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -24136,6 +24136,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + FSLogAutoAcceptInventoryToChat + + Comment + If enabled, auto-accepted inventory items will be logged to nearby chat. + Persist + 1 + Type + Boolean + Value + 1 + diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4be43838ed..f238b25097 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2356,6 +2356,43 @@ void inventory_offer_handler(LLOfferInfo* info) p.payload = payload; LLPostponedNotification::add(p, info->mFromID, false); } + // FIRE-19540: Log auto-accepted inventory to nearby chat + else if (gSavedSettings.getBOOL("FSLogAutoAcceptInventoryToChat")) + { + std::string message_type; + LLStringUtil::format_map_t chat_args; + + chat_args["OBJECT_TYPE"] = (!typestr.empty() ? LLTrans::getString(typestr) : ""); + chat_args["DESC"] = msg; + + if (info->mFromObject) + { + std::string str_pos; + std::string::size_type idx_start = info->mDesc.rfind(" ( http://"); + std::string::size_type idx_end = info->mDesc.find(" )", idx_start); + if (idx_start != std::string::npos && idx_end != std::string::npos) + { + LLSLURL url_pos(info->mDesc.substr(idx_start + 3, idx_end - (idx_start + 3))); + str_pos = "&slurl=" + LLURI::escape(url_pos.getLocationString()); + } + + chat_args["OBJECT_NAME"] = "[" + LLSLURL("objectim", info->mObjectID, "").getSLURLString() + "?name=" + LLURI::escape(info->mFromName) + "&owner=" + info->mFromID.asString() + (info->mFromGroup ? "&groupowned=true" : "") + str_pos + " " + info->mFromName + "]"; + message_type = "InvOfferAutoAcceptObject"; + } + else + { + bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) || + (RlvActions::canShowName(RlvActions::SNC_DEFAULT, info->mFromID)) || (!RlvUtil::isNearbyAgent(info->mFromID)) || (RlvUIEnabler::hasOpenIM(info->mFromID)) || (RlvUIEnabler::hasOpenProfile(info->mFromID)); + + std::string name_slurl = LLSLURL("agent", info->mFromID, (fRlvCanShowName ? "inspect" : "rlvanonym")).getSLURLString(); + + chat_args["USER_NAME"] = name_slurl; + message_type = "InvOfferAutoAcceptUser"; + } + + report_to_nearby_chat(LLTrans::getString(message_type, chat_args)); + } + // // Show offered inventory also if auto-accept is enabled (FIRE-5101) if (bAutoAccept && gSavedSettings.getBOOL("ShowNewInventory")) diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index ea6299af04..fc37211da2 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -3025,7 +3025,7 @@ Versuchen Sie es in einigen Minuten erneut. - [NAME_SLURL] hat Ihnen folgendes [OBJECTTYPE] übergeben: + [NAME_SLURL] hat Ihnen folgende/n/s [OBJECTTYPE] übergeben: [ITEM_SLURL]