diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 74af7cdf4c19764602a1cc63304860a6eb1e5e0a..faaa09332c117e0fc63c8e1212274666d249520b 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -175,7 +175,7 @@ void LLAvatarPropertiesProcessor::initAgentProfileCapRequest(const LLUUID& avata addPendingRequest(avatar_id, APT_PICKS); addPendingRequest(avatar_id, APT_GROUPS); addPendingRequest(avatar_id, APT_NOTES); - LLCoros::instance().launch("requestAgentUserInfoCoro", + LLCoros::instance().launch("requestAvatarPropertiesCoro", boost::bind(requestAvatarPropertiesCoro, cap_url, avatar_id)); } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index cb466bbb9d3e95481a1976daefe0f31be527f387..5678975830cfd834da03044fe29d8a487ca800e6 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -357,7 +357,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.ClickActionChange", boost::bind(&LLFloaterPreference::onClickActionChange, this)); - LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this ); + LLAvatarPropertiesProcessor::getInstance()->addObserver(LLUUID::null, this); mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::updateComplexityText, this)); @@ -406,7 +406,7 @@ void LLFloaterPreference::saveAvatarProperties( void ) { mAllowPublish = allowPublish; - LLCoros::instance().launch("requestAgentUserInfoCoro", + LLCoros::instance().launch("saveAvatarPropertiesCoro", boost::bind(saveAvatarPropertiesCoro, cap_url, allowPublish)); } } @@ -918,7 +918,7 @@ LLFloaterPreference::~LLFloaterPreference() if (mGridListChangedConnection.connected()) mGridListChangedConnection.disconnect(); #endif - LLAvatarPropertiesProcessor::getInstance()->removeObserver(gAgent.getID(), this); + LLAvatarPropertiesProcessor::getInstance()->removeObserver(LLUUID::null, this); LLConversationLog::instance().removeObserver(this); mComplexityChangedSignal.disconnect(); mDnDModeConnection.disconnect(); @@ -952,8 +952,6 @@ void LLFloaterPreference::saveSettings() void LLFloaterPreference::apply() { - LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this ); - LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core"); if (sSkin != gSavedSettings.getString("SkinCurrent")) { diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index a629d2b00a753e45ab545f70f91001819e5dd326..27fd2e111129ed9a909cee484bec1d7057173c20 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -116,6 +116,10 @@ LLPanelClassifiedInfo::LLPanelClassifiedInfo() LLPanelClassifiedInfo::~LLPanelClassifiedInfo() { + if (getAvatarId().notNull()) + { + LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this); + } sAllPanels.remove(this); } @@ -207,6 +211,7 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key) LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this); LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId()); + gGenericDispatcher.addHandler("classifiedclickthrough", &sClassifiedClickThrough); if (gAgent.getRegion()) diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp index 72303a2da21fe197b1bb06d13f79e542d3f41d84..de981d37c005998e70859f172faeade8bf706f1a 100644 --- a/indra/newview/llpanelprofileclassifieds.cpp +++ b/indra/newview/llpanelprofileclassifieds.cpp @@ -77,7 +77,12 @@ class LLClassifiedHandler : public LLCommandHandler, public LLAvatarPropertiesOb public: // throttle calls from untrusted browsers LLClassifiedHandler() : LLCommandHandler("classified", UNTRUSTED_THROTTLE) {} - + ~LLClassifiedHandler() + { + if(LLAvatarPropertiesProcessor::instanceExists()) + LLAvatarPropertiesProcessor::getInstance()->removeObserver(LLUUID(), this); + } + std::set<LLUUID> mClassifiedIds; std::string mRequestVerb;