summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-17 02:06:30 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-17 02:06:30 +0000
commitc57beb8b4bd51add9a92ddc4d704e7bea9c4d940 (patch)
tree8fc0abb0655302822390d227d9ec0ad7d4056563 /indra/llcommon
parentfb42741b620cea3d3b6380f1f099c92fcf4f3b04 (diff)
QAR-449 Viewer 1.20 RC 0
merge Branch_1-20-Viewer -r 84060 : 84432 -> release
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llapp.cpp24
-rw-r--r--indra/llcommon/llapp.h5
-rw-r--r--indra/llcommon/llversionviewer.h6
3 files changed, 30 insertions, 5 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index 067dc4fc43..d034334aab 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -78,6 +78,7 @@ BOOL LLApp::sLogInSignal = FALSE;
// static
LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status
LLAppErrorHandler LLApp::sErrorHandler = NULL;
+LLAppErrorHandler LLApp::sSyncErrorHandler = NULL;
BOOL LLApp::sErrorThreadRunning = FALSE;
#if !LL_WINDOWS
LLApp::child_map LLApp::sChildMap;
@@ -275,6 +276,21 @@ void LLApp::setErrorHandler(LLAppErrorHandler handler)
LLApp::sErrorHandler = handler;
}
+
+void LLApp::setSyncErrorHandler(LLAppErrorHandler handler)
+{
+ LLApp::sSyncErrorHandler = handler;
+}
+
+// static
+void LLApp::runSyncErrorHandler()
+{
+ if (LLApp::sSyncErrorHandler)
+ {
+ LLApp::sSyncErrorHandler();
+ }
+}
+
// static
void LLApp::runErrorHandler()
{
@@ -298,7 +314,13 @@ void LLApp::setStatus(EAppStatus status)
// static
void LLApp::setError()
{
- setStatus(APP_STATUS_ERROR);
+ if (!isError())
+ {
+ // perform any needed synchronous error-handling
+ runSyncErrorHandler();
+ // set app status to ERROR so that the LLErrorThread notices
+ setStatus(APP_STATUS_ERROR);
+ }
}
diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h
index c199601c20..c5a1546883 100644
--- a/indra/llcommon/llapp.h
+++ b/indra/llcommon/llapp.h
@@ -190,6 +190,7 @@ public:
// Error handling methods
//
void setErrorHandler(LLAppErrorHandler handler);
+ void setSyncErrorHandler(LLAppErrorHandler handler);
#if !LL_WINDOWS
//
@@ -246,13 +247,15 @@ protected:
private:
void setupErrorHandling(); // Do platform-specific error-handling setup (signals, structured exceptions)
- static void runErrorHandler();
+ static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred.
+ static void runSyncErrorHandler(); // run IMMEDIATELY when we get an error, ran in the context of the faulting thread.
// *NOTE: On Windows, we need a routine to reset the structured
// exception handler when some evil driver has taken it over for
// their own purposes
typedef int(*signal_handler_func)(int signum);
static LLAppErrorHandler sErrorHandler;
+ static LLAppErrorHandler sSyncErrorHandler;
// Default application threads
LLErrorThread* mThreadErrorp; // Waits for app to go to status ERROR, then runs the error callback
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 8e964d3891..c586acc7d9 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -33,9 +33,9 @@
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 1;
-const S32 LL_VERSION_MINOR = 19;
-const S32 LL_VERSION_PATCH = 1;
-const S32 LL_VERSION_BUILD = 84396;
+const S32 LL_VERSION_MINOR = 20;
+const S32 LL_VERSION_PATCH = 0;
+const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Release";