Misc little tidbits from V3.

This commit is contained in:
Shyotl
2011-09-20 22:16:00 -05:00
parent 587a687ac6
commit 2b69eb9902
7 changed files with 39 additions and 22 deletions

View File

@@ -625,16 +625,20 @@ void LLVOCache::readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::voca
S32 num_entries;
success = check_read(&apr_file, &num_entries, sizeof(S32)) ;
for (S32 i = 0; success && i < num_entries; i++)
if(success)
{
LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file);
if (!entry->getLocalID())
for (S32 i = 0; i < num_entries; i++)
{
llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl;
delete entry ;
success = false ;
LLVOCacheEntry* entry = new LLVOCacheEntry(&apr_file);
if (!entry->getLocalID())
{
llwarns << "Aborting cache file load for " << filename << ", cache file corruption!" << llendl;
delete entry ;
success = false ;
break ;
}
cache_entry_map[entry->getLocalID()] = entry;
}
cache_entry_map[entry->getLocalID()] = entry;
}
}
}