Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions indra/newview/llviewerassetstorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,6 @@ void LLViewerAssetStorage::capsRecvForRegion(const LLUUID& region_id, std::strin
{
LL_WARNS("ViewerAsset") << "region not found for region_id " << region_id << LL_ENDL;
}
else
{
mViewerAssetUrl = regionp->getViewerAssetUrl();
}

LLEventPumps::instance().obtain(pumpname).post(LLSD());
}
Expand Down Expand Up @@ -534,21 +530,22 @@ void LLViewerAssetStorage::assetRequestCoro(
}

LL_WARNS_ONCE("ViewerAsset") << "capsRecv got event" << LL_ENDL;
LL_WARNS_ONCE("ViewerAsset") << "region " << gAgent.getRegion() << " mViewerAssetUrl " << mViewerAssetUrl << LL_ENDL;
}
if (mViewerAssetUrl.empty() && gAgent.getRegion())

std::string viewerAssetUrl;
if (gAgent.getRegion())
{
mViewerAssetUrl = gAgent.getRegion()->getViewerAssetUrl();
viewerAssetUrl = gAgent.getRegion()->getViewerAssetUrl();
}
Comment on lines +535 to 539

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is fair. This does a capabilitiesReceived() check, but then waits on uspendUntilEventOnWithTimeout, so agent's region might have changed during the wait.

if (mViewerAssetUrl.empty())
if (viewerAssetUrl.empty())
{
LL_WARNS_ONCE("ViewerAsset") << "asset request fails: caps received but no viewer asset cap found" << LL_ENDL;
result_code = LL_ERR_NO_CAP;
ext_status = LLExtStat::NONE;
removeAndCallbackPendingDownloads(uuid, atype, uuid, atype, result_code, ext_status, 0);
return;
}
std::string url = getAssetURL(mViewerAssetUrl, uuid,atype);
std::string url = getAssetURL(viewerAssetUrl, uuid, atype);
LL_DEBUGS("ViewerAsset") << "request url: " << url << LL_ENDL;

LLCore::HttpRequest::policy_t httpPolicy(LLAppCoreHttp::AP_TEXTURE);
Expand Down
1 change: 0 additions & 1 deletion indra/newview/llviewerassetstorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class LLViewerAssetStorage : public LLAssetStorage
void *mUserData;
};

std::string mViewerAssetUrl;
S32 mCountRequests;
S32 mCountStarted;
S32 mCountCompleted;
Expand Down
Loading