aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/llhttpclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llmessage/llhttpclient.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/linden/indra/llmessage/llhttpclient.cpp b/linden/indra/llmessage/llhttpclient.cpp
index 4c466c5..23d9529 100644
--- a/linden/indra/llmessage/llhttpclient.cpp
+++ b/linden/indra/llmessage/llhttpclient.cpp
@@ -161,9 +161,10 @@ namespace
161 fstream.seekg(0, std::ios::end); 161 fstream.seekg(0, std::ios::end);
162 U32 fileSize = fstream.tellg(); 162 U32 fileSize = fstream.tellg();
163 fstream.seekg(0, std::ios::beg); 163 fstream.seekg(0, std::ios::beg);
164 std::vector<char> fileBuffer(fileSize); 164 char* fileBuffer;
165 fstream.read(&fileBuffer[0], fileSize); 165 fileBuffer = new char [fileSize];
166 ostream.write(&fileBuffer[0], fileSize); 166 fstream.read(fileBuffer, fileSize);
167 ostream.write(fileBuffer, fileSize);
167 fstream.close(); 168 fstream.close();
168 eos = true; 169 eos = true;
169 return STATUS_DONE; 170 return STATUS_DONE;
@@ -190,9 +191,10 @@ namespace
190 191
191 LLVFile vfile(gVFS, mUUID, mAssetType, LLVFile::READ); 192 LLVFile vfile(gVFS, mUUID, mAssetType, LLVFile::READ);
192 S32 fileSize = vfile.getSize(); 193 S32 fileSize = vfile.getSize();
193 std::vector<U8> fileBuffer(fileSize); 194 U8* fileBuffer;
194 vfile.read(&fileBuffer[0], fileSize); 195 fileBuffer = new U8 [fileSize];
195 ostream.write((char*)&fileBuffer[0], fileSize); 196 vfile.read(fileBuffer, fileSize);
197 ostream.write((char*)fileBuffer, fileSize);
196 eos = true; 198 eos = true;
197 return STATUS_DONE; 199 return STATUS_DONE;
198 } 200 }