Massive commit, beefed up the audio crash prevention, made a blacklist for assets, added sound explorer, fixed import, added item button to vfs explorer.

JELLY ROLL
This commit is contained in:
phr0z3nt04st
2010-07-08 00:20:37 -05:00
parent 30f5ce7491
commit 82aef8fa4c
27 changed files with 1232 additions and 61 deletions

View File

@@ -422,6 +422,17 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
}
return;
}
/* <edit> */
if(std::find(mBlackListedAsset.begin(),mBlackListedAsset.end(),uuid) != mBlackListedAsset.end())
{
llinfos << "Blacklisted asset " << uuid.asString() << " was trying to be accessed!!!!!!" << llendl;
if (callback)
{
callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID);
}
return;
}
/* </edit> */
BOOL exists = mVFS->getExists(uuid, type);
LLVFile file(mVFS, uuid, type);

View File

@@ -262,6 +262,8 @@ public:
virtual void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE);
std::vector<LLUUID> mBlackListedAsset;
/*
* TransactionID version
* Viewer needs the store_local

View File

@@ -599,7 +599,33 @@ void LLCacheName::get(const LLUUID& id, BOOL is_group, LLCacheNameCallback callb
impl.mReplyQueue.push_back(PendingReply(id, callback, user_data));
}
}
// <edit>
BOOL LLCacheName::getIfThere(const LLUUID& id, std::string& fullname, BOOL& is_group)
{
if(id.isNull())
{
fullname = "";
return FALSE;
}
LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id );
if (entry)
{
if (entry->mIsGroup)
{
fullname = entry->mGroupName;
}
else
{
fullname = entry->mFirstName + " " + entry->mLastName;
}
is_group = entry->mIsGroup;
return TRUE;
}
fullname = "";
return FALSE;
}
// </edit>
void LLCacheName::processPending()
{
const F32 SECS_BETWEEN_PROCESS = 0.1f;

View File

@@ -90,7 +90,11 @@ public:
// otherwise, will request the data, and will call the callback when
// available. There is no garuntee the callback will ever be called.
void get(const LLUUID& id, BOOL is_group, LLCacheNameCallback callback, void* user_data = NULL);
// <edit>
BOOL getIfThere(const LLUUID& id, std::string& fullname, BOOL& is_group);
// </edit>
// LEGACY
void getName(const LLUUID& id, LLCacheNameCallback callback, void* user_data = NULL)
{ get(id, FALSE, callback, user_data); }