diff options
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index b282a2b90c..f48543822a 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -266,14 +266,13 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) return; } - LLWorld *world_inst = LLWorld::getInstance(); // Not a singleton! - if (!world_inst) + if (!LLWorld::instanceExists()) { LL_WARNS("AppInit", "Capabilities") << "Attempting to get capabilities, but world no longer exists!" << LL_ENDL; return; } - regionp = world_inst->getRegionFromHandle(regionHandle); + regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); if (!regionp) //region was removed { LL_WARNS("AppInit", "Capabilities") << "Attempting to get capabilities for region that no longer exists!" << LL_ENDL; @@ -321,7 +320,6 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) regionp = NULL; impl = NULL; - world_inst = NULL; result = httpAdapter->postAndSuspend(httpRequest, url, capabilityNames); if (STATE_WORLD_INIT > LLStartUp::getStartupState()) @@ -332,17 +330,36 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) if (LLApp::isExiting() || gDisconnected) { + LL_DEBUGS("AppInit", "Capabilities") << "Shutting down" << LL_ENDL; return; } - world_inst = LLWorld::getInstance(); - if (!world_inst) + if (!result.isMap() || result.has("error")) + { + LL_WARNS("AppInit", "Capabilities") << "Malformed response" << LL_ENDL; + // setup for retry. + continue; + } + + LLSD httpResults = result["http_result"]; + LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); + if (!status) + { + LL_WARNS("AppInit", "Capabilities") << "HttpStatus error " << LL_ENDL; + // setup for retry. + continue; + } + + // remove the http_result from the llsd + result.erase("http_result"); + + if (!LLWorld::instanceExists()) { LL_WARNS("AppInit", "Capabilities") << "Received capabilities, but world no longer exists!" << LL_ENDL; return; } - regionp = world_inst->getRegionFromHandle(regionHandle); + regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle); if (!regionp) //region was removed { LL_WARNS("AppInit", "Capabilities") << "Received capabilities for region that no longer exists!" << LL_ENDL; @@ -351,7 +368,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) impl = regionp->getRegionImplNC(); - ++impl->mSeedCapAttempts; + ++(impl->mSeedCapAttempts); if (id != impl->mHttpResponderID) // region is no longer referring to this request { @@ -360,25 +377,6 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) continue; } - if (!result.isMap() || result.has("error")) - { - LL_WARNS("AppInit", "Capabilities") << "Malformed response" << LL_ENDL; - // setup for retry. - continue; - } - - LLSD httpResults = result["http_result"]; - LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults); - if (!status) - { - LL_WARNS("AppInit", "Capabilities") << "HttpStatus error " << LL_ENDL; - // setup for retry. - continue; - } - - // remove the http_result from the llsd - result.erase("http_result"); - LLSD::map_const_iterator iter; for (iter = result.beginMap(); iter != result.endMap(); ++iter) { @@ -3002,6 +3000,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("AcceptFriendship"); capabilityNames.append("AcceptGroupInvite"); // ReadOfflineMsgs recieved messages only!!! capabilityNames.append("AgentPreferences"); + capabilityNames.append("AgentProfile"); capabilityNames.append("AgentState"); capabilityNames.append("AttachmentResources"); capabilityNames.append("AvatarPickerSearch"); @@ -3096,6 +3095,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("UpdateScriptTask"); capabilityNames.append("UpdateSettingsAgentInventory"); capabilityNames.append("UpdateSettingsTaskInventory"); + capabilityNames.append("UploadAgentProfileImage"); capabilityNames.append("UploadBakedTexture"); capabilityNames.append("UserInfo"); capabilityNames.append("ViewerAsset"); |