diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-03-18 22:45:38 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-03-18 23:01:04 +0200 |
commit | c0f28ae36261cc31d6412c42c05d1b7719a2c04b (patch) | |
tree | b03addbbb4d58c3ae1838ea8c9127349904de9d8 /indra/newview | |
parent | 7844f7e922cc28cb2b44c21f08039b44025eac0e (diff) |
SL-14927 Some avatar names not resolving
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagent.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llagent.h | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llappviewer.h | 3 | ||||
-rw-r--r-- | indra/newview/llenvironment.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerregion.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewerregion.h | 2 | ||||
-rw-r--r-- | indra/newview/llwlhandlers.cpp | 2 |
8 files changed, 18 insertions, 19 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 5c00cfc783..baf0acc94b 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -879,13 +879,12 @@ boost::signals2::connection LLAgent::addParcelChangedCallback(parcel_changed_cal } // static -void LLAgent::capabilityReceivedCallback(const LLUUID ®ion_id) +void LLAgent::capabilityReceivedCallback(const LLUUID ®ion_id, LLViewerRegion *regionp) { - LLViewerRegion* region = gAgent.getRegion(); - if (region && region->getRegionID() == region_id) + if (regionp && regionp->getRegionID() == region_id) { - region->requestSimulatorFeatures(); - LLAppViewer::instance()->updateNameLookupUrl(); + regionp->requestSimulatorFeatures(); + LLAppViewer::instance()->updateNameLookupUrl(regionp); } } @@ -936,7 +935,7 @@ void LLAgent::setRegion(LLViewerRegion *regionp) if (regionp->capabilitiesReceived()) { regionp->requestSimulatorFeatures(); - LLAppViewer::instance()->updateNameLookupUrl(); + LLAppViewer::instance()->updateNameLookupUrl(regionp); } else { @@ -962,11 +961,11 @@ void LLAgent::setRegion(LLViewerRegion *regionp) if (regionp->capabilitiesReceived()) { - LLAppViewer::instance()->updateNameLookupUrl(); + LLAppViewer::instance()->updateNameLookupUrl(regionp); } else { - regionp->setCapabilitiesReceivedCallback([](const LLUUID ®ion_id) {LLAppViewer::instance()->updateNameLookupUrl(); }); + regionp->setCapabilitiesReceivedCallback([](const LLUUID ®ion_id, LLViewerRegion* regionp) {LLAppViewer::instance()->updateNameLookupUrl(regionp); }); } } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index d46c99db8c..f5ca42af5b 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -254,7 +254,7 @@ public: boost::signals2::connection addParcelChangedCallback(parcel_changed_callback_t); private: - static void capabilityReceivedCallback(const LLUUID ®ion_id); + static void capabilityReceivedCallback(const LLUUID ®ion_id, LLViewerRegion *regionp); typedef boost::signals2::signal<void()> parcel_changed_signal_t; parcel_changed_signal_t mParcelChangedSignal; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 7c2f622abd..fe2da2f989 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5226,10 +5226,9 @@ void LLAppViewer::sendLogoutRequest() } } -void LLAppViewer::updateNameLookupUrl() +void LLAppViewer::updateNameLookupUrl(const LLViewerRegion * regionp) { - LLViewerRegion* region = gAgent.getRegion(); - if (!region || !region->capabilitiesReceived()) + if (!regionp || !regionp->capabilitiesReceived()) { return; } @@ -5238,7 +5237,7 @@ void LLAppViewer::updateNameLookupUrl() bool had_capability = LLAvatarNameCache::getInstance()->hasNameLookupURL(); std::string name_lookup_url; name_lookup_url.reserve(128); // avoid a memory allocation below - name_lookup_url = region->getCapability("GetDisplayNames"); + name_lookup_url = regionp->getCapability("GetDisplayNames"); bool have_capability = !name_lookup_url.empty(); if (have_capability) { diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 6db45583eb..95e93be572 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -57,6 +57,7 @@ class LLImageDecodeThread; class LLTextureFetch; class LLWatchdogTimeout; class LLViewerJoystick; +class LLViewerRegion; extern LLTrace::BlockTimerStatHandle FTM_FRAME; @@ -209,7 +210,7 @@ public: // llcorehttp init/shutdown/config information. LLAppCoreHttp & getAppCoreHttp() { return mAppCoreHttp; } - void updateNameLookupUrl(); + void updateNameLookupUrl(const LLViewerRegion* regionp); protected: virtual bool initWindow(); // Initialize the viewer's window. diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index b6f120e644..431ca4fc05 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1029,7 +1029,7 @@ void LLEnvironment::onRegionChange() } if (!cur_region->capabilitiesReceived()) { - cur_region->setCapabilitiesReceivedCallback([](const LLUUID ®ion_id) { LLEnvironment::instance().requestRegion(); }); + cur_region->setCapabilitiesReceivedCallback([](const LLUUID ®ion_id, LLViewerRegion* regionp) { LLEnvironment::instance().requestRegion(); }); return; } requestRegion(); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 2fde4fe49c..f007aefc70 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2241,7 +2241,7 @@ void LLViewerRegion::setSimulatorFeaturesReceived(bool received) mSimulatorFeaturesReceived = received; if (received) { - mSimulatorFeaturesReceivedSignal(getRegionID()); + mSimulatorFeaturesReceivedSignal(getRegionID(), this); mSimulatorFeaturesReceivedSignal.disconnect_all_slots(); } } @@ -3183,7 +3183,7 @@ void LLViewerRegion::setCapabilitiesReceived(bool received) // so that they can safely use getCapability(). if (received) { - mCapabilitiesReceivedSignal(getRegionID()); + mCapabilitiesReceivedSignal(getRegionID(), this); LLFloaterPermsDefault::sendInitialPerms(); diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index dfd8c64f76..fcbf56c81f 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -94,7 +94,7 @@ public: NUM_PARTITIONS } eObjectPartitions; - typedef boost::signals2::signal<void(const LLUUID& region_id)> caps_received_signal_t; + typedef boost::signals2::signal<void(const LLUUID& region_id, LLViewerRegion* regionp)> caps_received_signal_t; LLViewerRegion(const U64 &handle, const LLHost &host, diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index 730aa3774f..d55e1b7cd3 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -51,7 +51,7 @@ bool LLEnvironmentRequest::initiate(LLEnvironment::environment_apply_fn cb) if (!cur_region->capabilitiesReceived()) { LL_INFOS("WindlightCaps") << "Deferring windlight settings request until we've got region caps" << LL_ENDL; - cur_region->setCapabilitiesReceivedCallback([cb](const LLUUID ®ion_id) { LLEnvironmentRequest::onRegionCapsReceived(region_id, cb); }); + cur_region->setCapabilitiesReceivedCallback([cb](const LLUUID ®ion_id, LLViewerRegion* regionp) { LLEnvironmentRequest::onRegionCapsReceived(region_id, cb); }); return false; } |