summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-03-29 14:46:14 -0400
committerLoren Shih <seraph@lindenlab.com>2010-03-29 14:46:14 -0400
commit3ce8365062ff887f85ffb843d11d84038651b0a4 (patch)
tree3beacf9be9f79f8b05c4e2ce483d56d6a41d7139
parentfbdd93bb91c921b387682269423ce07dd69a92d1 (diff)
parent5de0c907de836106dbc175978ddfca76a796ff93 (diff)
automated merge
-rw-r--r--indra/newview/lltexturecache.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 7a0712f8aa..08bc8220d9 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -852,8 +852,8 @@ bool LLTextureCache::updateTextureEntryList(const LLUUID& id, S32 bodysize)
}
else if (oldbodysize != entry.mBodySize)
{
- // TODO: change to llwarns
- llerrs << "Entry mismatch in mTextureSizeMap / mHeaderIDMap"
+ // only happens to 64 bits systems, do not know why.
+ llwarns << "Entry mismatch in mTextureSizeMap / mHeaderIDMap"
<< " idx=" << idx << " oldsize=" << oldbodysize << " entrysize=" << entry.mBodySize << llendl;
}
updateEntry(idx, entry, entry.mImageSize, bodysize);
@@ -1221,9 +1221,17 @@ U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries)
mFreeList.clear();
mTexturesSizeTotal = 0;
- LLAPRFile* aprfile = openHeaderEntriesFile(true, 0);
- updatedHeaderEntriesFile() ;
- aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo));
+ LLAPRFile* aprfile = NULL;
+ if(mUpdatedEntryMap.empty())
+ {
+ aprfile = openHeaderEntriesFile(true, (S32)sizeof(EntriesInfo));
+ }
+ else //update the header file first.
+ {
+ aprfile = openHeaderEntriesFile(false, 0);
+ updatedHeaderEntriesFile() ;
+ aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo));
+ }
for (U32 idx=0; idx<num_entries; idx++)
{
Entry entry;