diff options
author | Oz Linden <oz@lindenlab.com> | 2011-05-02 07:24:50 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-05-02 07:24:50 -0400 |
commit | 818f12fbf734676f8d067ef29a786e79676fb4f0 (patch) | |
tree | 08f330301d10e15ef6b9c942dfe39ade9ab6c4fe /indra/llmessage | |
parent | a32daa0c10b285354e94e0e8bf0cc6c5ffce09a5 (diff) | |
parent | e26bfe00ef467a65eb126a75fa2aba6ccd5cd07a (diff) |
merge changes for storm-380
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llassetstorage.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 27a368df3d..69d092de76 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -398,6 +398,12 @@ BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data) { + if (user_data) + { + // The *user_data should not be passed without a callback to clean it up. + llassert(callback != NULL) + } + BOOL exists = mStaticVFS->getExists(uuid, type); if (exists) { @@ -432,15 +438,26 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL llinfos << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl; + if (user_data) + { + // The *user_data should not be passed without a callback to clean it up. + llassert(callback != NULL) + } + if (mShutDown) { llinfos << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl; - return; // don't get the asset or do any callbacks, we are shutting down + + if (callback) + { + callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_FAILED, LL_EXSTAT_NONE); + } + return; } - + if (uuid.isNull()) { - // Special case early out for NULL uuid + // Special case early out for NULL uuid and for shutting down if (callback) { callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID); |