diff options
author | Bryan O'Sullivan <bos@lindenlab.com> | 2008-06-02 21:14:31 +0000 |
---|---|---|
committer | Bryan O'Sullivan <bos@lindenlab.com> | 2008-06-02 21:14:31 +0000 |
commit | 9db949eec327df4173fde3de934a87bedb0db13c (patch) | |
tree | aeffa0f0e68b1d2ceb74d460cbbd22652c9cd159 /indra/newview/llviewerregion.cpp | |
parent | 419e13d0acaabf5e1e02e9b64a07648bce822b2f (diff) |
svn merge -r88066:88786 svn+ssh://svn.lindenlab.com/svn/linden/branches/cmake-9-merge
dataserver-is-deprecated
for-fucks-sake-whats-with-these-commit-markers
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 632526c061..f5ea73f1fc 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -478,7 +478,7 @@ std::string LLViewerRegion::regionFlagsToString(U32 flags) } // *TODO:Translate -char* SIM_ACCESS_STR[] = { "Free Trial", +const char* SIM_ACCESS_STR[] = { "Free Trial", "PG", "Mature", "Offline", @@ -1309,8 +1309,9 @@ class BaseCapabilitiesComplete : public LLHTTPClient::Responder { LOG_CLASS(BaseCapabilitiesComplete); public: - BaseCapabilitiesComplete(LLViewerRegion* region) - : mRegion(region) + BaseCapabilitiesComplete(LLViewerRegion* region, LLSD requestedCaps) + : mRegion(region), + mRequestedCaps(requestedCaps) { } void error(U32 statusNum, const std::string& reason) @@ -1326,8 +1327,16 @@ public: void result(const LLSD& content) { LLSD::map_const_iterator iter; + for(iter = content.beginMap(); iter != content.endMap(); ++iter) { + if (iter->second.asString().empty()) + { + llwarns << "BaseCapabilitiesComplete::result EMPTY capability " + << iter->first << llendl; + continue; + } + mRegion->setCapability(iter->first, iter->second); LL_DEBUGS2("AppInit", "Capabilities") << "got capability for " << iter->first << LL_ENDL; @@ -1340,6 +1349,21 @@ public: } } + LLSD::array_const_iterator fail; + for (fail = mRequestedCaps.beginArray(); + fail != mRequestedCaps.endArray(); + ++fail) + { + std::string cap = fail->asString(); + + if (mRegion->getCapability(cap).empty() && + !LLViewerRegion::isSpecialCapabilityName(cap)) + { + llwarns << "BaseCapabilitiesComplete::result FAILED to get " + << "capability " << cap << llendl; + } + } + if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) { LLStartUp::setStartupState( STATE_SEED_CAP_GRANTED ); @@ -1347,14 +1371,16 @@ public: } static boost::intrusive_ptr<BaseCapabilitiesComplete> build( - LLViewerRegion* region) + LLViewerRegion* region, + LLSD requestedCaps) { return boost::intrusive_ptr<BaseCapabilitiesComplete>( - new BaseCapabilitiesComplete(region)); + new BaseCapabilitiesComplete(region, requestedCaps)); } private: LLViewerRegion* mRegion; + LLSD mRequestedCaps; }; @@ -1409,7 +1435,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url) llinfos << "posting to seed " << url << llendl; - LLHTTPClient::post(url, capabilityNames, BaseCapabilitiesComplete::build(this)); + LLHTTPClient::post(url, capabilityNames, + BaseCapabilitiesComplete::build(this, capabilityNames)); } void LLViewerRegion::setCapability(const std::string& name, const std::string& url) @@ -1430,6 +1457,11 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u } } +bool LLViewerRegion::isSpecialCapabilityName(const std::string &name) +{ + return name == "EventQueueGet" || name == "UntrustedSimulatorMessage"; +} + std::string LLViewerRegion::getCapability(const std::string& name) const { CapabilityMap::const_iterator iter = mCapabilities.find(name); |