summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-19 13:52:59 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-04-19 13:52:59 -0400
commitaa5e494e0cf1242dcd35725576667ab1a935363a (patch)
tree5d2876bc5adf42d74ddd099c6f0a608e5455ec90 /indra
parent70a13fb3227469179ef388d95879667361ef5c03 (diff)
For EXT-6809 - fixes suggested by Nyx code review
Diffstat (limited to 'indra')
-rw-r--r--indra/llmessage/llassetstorage.cpp21
-rw-r--r--indra/llmessage/llassetstorage.h6
-rw-r--r--indra/newview/llappviewer.cpp8
3 files changed, 16 insertions, 19 deletions
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index a35ea488b4..20d71c6903 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -401,30 +401,27 @@ BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType
return mStaticVFS->getExists(uuid, type) || mVFS->getExists(uuid, type);
}
-bool LLAssetStorage::findInVFSAndInvokeCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type,
- LLGetAssetCallback callback, void *user_data)
+bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type,
+ LLGetAssetCallback callback, void *user_data)
{
- // Try in static VFS first.
- BOOL exists = vfs->getExists(uuid, type);
+ BOOL exists = mStaticVFS->getExists(uuid, type);
if (exists)
{
- LLVFile file(vfs, uuid, type);
+ LLVFile file(mStaticVFS, uuid, type);
U32 size = exists ? file.getSize() : 0;
if (size>0)
{
// we've already got the file
- // theoretically, partial files w/o a pending request shouldn't happen
- // unless there's a weird error
if (callback)
{
- callback(vfs, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
+ callback(mStaticVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
}
return true;
}
else
{
llwarns << "Asset vfile " << uuid << ":" << type
- << " found with bad size " << file.getSize() << ", ignoring" << llendl;
+ << " found in static cache with bad size " << file.getSize() << ", ignoring" << llendl;
}
}
return false;
@@ -457,7 +454,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
}
// Try static VFS first.
- if (findInVFSAndInvokeCallback(mStaticVFS,uuid,type,callback,user_data))
+ if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data))
{
return;
}
@@ -660,7 +657,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
}
// Try static VFS first.
- if (findInVFSAndInvokeCallback(mStaticVFS,asset_id,atype,callback,user_data))
+ if (findInStaticVFSAndInvokeCallback(asset_id,atype,callback,user_data))
{
return;
}
@@ -797,7 +794,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age
if(asset_id.notNull())
{
// Try static VFS first.
- if (findInVFSAndInvokeCallback(mStaticVFS, asset_id, atype, callback, user_data))
+ if (findInStaticVFSAndInvokeCallback( asset_id, atype, callback, user_data))
{
return;
}
diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h
index 39afa4b62c..e97b398ca7 100644
--- a/indra/llmessage/llassetstorage.h
+++ b/indra/llmessage/llassetstorage.h
@@ -258,9 +258,6 @@ public:
virtual BOOL hasLocalAsset(const LLUUID &uuid, LLAssetType::EType type);
- bool findInVFSAndInvokeCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type,
- LLGetAssetCallback callback, void *user_data);
-
// public interface methods
// note that your callback may get called BEFORE the function returns
@@ -319,6 +316,9 @@ public:
void markAssetToxic( const LLUUID& uuid );
protected:
+ bool findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type,
+ LLGetAssetCallback callback, void *user_data);
+
virtual LLSD getPendingDetailsImpl(const request_list_t* requests,
LLAssetType::EType asset_type,
const std::string& detail_prefix) const;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c23ccfa4fb..d6f2440ede 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3243,11 +3243,11 @@ bool LLAppViewer::initCache()
{
LLVFile::initClass();
- llinfos << "Static VFS listing" << llendl;
- gStaticVFS->listFiles();
+ //llinfos << "Static VFS listing" << llendl;
+ //gStaticVFS->listFiles();
- llinfos << "regular VFS listing" << llendl;
- gVFS->listFiles();
+ //llinfos << "regular VFS listing" << llendl;
+ //gVFS->listFiles();
return true;
}