summaryrefslogtreecommitdiff
path: root/indra/viewer_components/updater
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2010-11-16 16:21:51 -0800
committerMark Palange (Mani) <palange@lindenlab.com>2010-11-16 16:21:51 -0800
commit23610ad7dfcffad14b71c0a2bdfa75997f1e8258 (patch)
treedb98f246226151261f40d11fd833c9905c2c2e65 /indra/viewer_components/updater
parent13b77e3622de18ac8d06fdfffceb08990eb908f9 (diff)
parentad354324ca444d1fc71653e2ade799053a8d6f01 (diff)
merge
Diffstat (limited to 'indra/viewer_components/updater')
-rw-r--r--indra/viewer_components/updater/llupdatedownloader.cpp7
-rw-r--r--indra/viewer_components/updater/scripts/windows/update_install.bat3
2 files changed, 8 insertions, 2 deletions
diff --git a/indra/viewer_components/updater/llupdatedownloader.cpp b/indra/viewer_components/updater/llupdatedownloader.cpp
index ab441aa747..eccc25aeee 100644
--- a/indra/viewer_components/updater/llupdatedownloader.cpp
+++ b/indra/viewer_components/updater/llupdatedownloader.cpp
@@ -275,9 +275,14 @@ size_t LLUpdateDownloader::Implementation::onHeader(void * buffer, size_t size)
size_t LLUpdateDownloader::Implementation::onBody(void * buffer, size_t size)
{
if(mCancelled) return 0; // Forces a write error which will halt curl thread.
+ if((size == 0) || (buffer == 0)) return 0;
mDownloadStream.write(reinterpret_cast<const char *>(buffer), size);
- return size;
+ if(mDownloadStream.bad()) {
+ return 0;
+ } else {
+ return size;
+ }
}
diff --git a/indra/viewer_components/updater/scripts/windows/update_install.bat b/indra/viewer_components/updater/scripts/windows/update_install.bat
index 44ccef010b..42e148a707 100644
--- a/indra/viewer_components/updater/scripts/windows/update_install.bat
+++ b/indra/viewer_components/updater/scripts/windows/update_install.bat
@@ -1,2 +1,3 @@
start /WAIT %1 /SKIP_DIALOGS
-IF ERRORLEVEL 1 ECHO ERRORLEVEL > %2
+IF ERRORLEVEL 1 ECHO %ERRORLEVEL% > %2
+DEL %1