summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp54
1 files changed, 29 insertions, 25 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 91fae709df..a245639fac 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1284,6 +1284,21 @@ bool LLAppViewer::mainLoop()
return true;
}
+void LLAppViewer::flushVFSIO()
+{
+ while (1)
+ {
+ S32 pending = LLVFSThread::updateClass(0);
+ pending += LLLFSThread::updateClass(0);
+ if (!pending)
+ {
+ break;
+ }
+ llinfos << "Waiting for pending IO to finish: " << pending << llendflush;
+ ms_sleep(100);
+ }
+}
+
bool LLAppViewer::cleanup()
{
// workaround for DEV-35406 crash on shutdown
@@ -1419,17 +1434,7 @@ bool LLAppViewer::cleanup()
llinfos << "Cache files removed" << llendflush;
// Wait for any pending VFS IO
- while (1)
- {
- S32 pending = LLVFSThread::updateClass(0);
- pending += LLLFSThread::updateClass(0);
- if (!pending)
- {
- break;
- }
- llinfos << "Waiting for pending IO to finish: " << pending << llendflush;
- ms_sleep(100);
- }
+ flushVFSIO();
llinfos << "Shutting down Views" << llendflush;
// Destroy the UI
@@ -2879,13 +2884,20 @@ void LLAppViewer::forceQuit()
LLApp::setQuitting();
}
-void LLAppViewer::fastQuit()
+void LLAppViewer::fastQuit(S32 error_code)
{
- if (LLStartUp::getStartupState() >= STATE_STARTED)
- {
- sendLogoutRequest();
- }
- _exit(isError());
+ // finish pending transfers
+ flushVFSIO();
+ // let sim know we're logging out
+ sendLogoutRequest();
+ // flush network buffers by shutting down messaging system
+ end_messaging_system();
+ // figure out the error code
+ S32 final_error_code = error_code ? error_code : (S32)isError();
+ // this isn't a crash
+ removeMarkerFile();
+ // get outta here
+ _exit(final_error_code);
}
void LLAppViewer::requestQuit()
@@ -2973,14 +2985,6 @@ void LLAppViewer::earlyExitNoNotify()
finish_early_exit( LLSD(), LLSD() );
}
-void LLAppViewer::forceExit(S32 arg)
-{
- removeMarkerFile();
-
- // *FIX:Mani - This kind of exit hardly seems appropriate.
- exit(arg);
-}
-
void LLAppViewer::abortQuit()
{
llinfos << "abortQuit()" << llendl;