summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-04-22 11:32:07 -0600
committerXiaohong Bao <bao@lindenlab.com>2010-04-22 11:32:07 -0600
commit21dc4949feb0b0436471c409ddca809208a12852 (patch)
tree3756ced5f14c80afe4a55295589ecbd4792a23e4 /indra/newview
parent8154a04f4864b9e88680dc5f5351579e916600e5 (diff)
fix for EXT-6928: Viewer crashes immediately after enabling HTTP Textures on a http-texture-server-1 simulator
and EXT-7009: textures fetched through http are never cached.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltexturefetch.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 2ea6e5936d..aea94fd720 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -850,6 +850,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mState = WAIT_HTTP_REQ;
mFetcher->addToHTTPQueue(mID);
+ mSentRequest = QUEUED;
// Will call callbackHttpGet when curl request completes
std::vector<std::string> headers;
headers.push_back("Accept: image/x-j2c");
@@ -936,6 +937,11 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
mFileSize = mBufferSize;
}
+ else //the file size is unknown
+ {
+ mFileSize = mBufferSize + 1 ; //flag the file is not fully loaded.
+ }
+
U8* buffer = new U8[mBufferSize];
if (cur_size > 0)
{