summaryrefslogtreecommitdiff
path: root/indra/llmessage/llxfer_vfile.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-04-19 18:37:35 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-04-19 18:37:35 +0300
commit4d3642b2fab163668b1d67c0a6b631417e71e02d (patch)
tree0d8e821e90662098ed69138451c4d36a1128542f /indra/llmessage/llxfer_vfile.cpp
parent1fc32d4c973275cf86d2b936e7bb3241e0155197 (diff)
MAINT-7626 Incorporate transfer changes into viewer
Diffstat (limited to 'indra/llmessage/llxfer_vfile.cpp')
-rw-r--r--indra/llmessage/llxfer_vfile.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/llmessage/llxfer_vfile.cpp b/indra/llmessage/llxfer_vfile.cpp
index 4a378d1d34..5d41180192 100644
--- a/indra/llmessage/llxfer_vfile.cpp
+++ b/indra/llmessage/llxfer_vfile.cpp
@@ -205,6 +205,38 @@ S32 LLXfer_VFile::startSend (U64 xfer_id, const LLHost &remote_host)
}
///////////////////////////////////////////////////////////
+
+void LLXfer_VFile::closeFileHandle()
+{
+ if (mVFile)
+ {
+ delete mVFile;
+ mVFile = NULL;
+ }
+}
+
+///////////////////////////////////////////////////////////
+
+S32 LLXfer_VFile::reopenFileHandle()
+{
+ S32 retval = LL_ERR_NOERR; // presume success
+
+ if (mVFile == NULL)
+ {
+ mVFile =new LLVFile(mVFS, mLocalID, mType, LLVFile::READ);
+ if (mVFile == NULL)
+ {
+ LL_WARNS("Xfer") << "LLXfer_VFile::reopenFileHandle() can't read VFS file " << mLocalID << "." << LLAssetType::lookup(mType) << LL_ENDL;
+ retval = LL_ERR_FILE_NOT_FOUND;
+ }
+ }
+
+ return retval;
+}
+
+
+///////////////////////////////////////////////////////////
+
void LLXfer_VFile::setXferSize (S32 xfer_size)
{
LLXfer::setXferSize(xfer_size);