From 189599b6ff0c4e6b81e761fbc990c057189359f2 Mon Sep 17 00:00:00 2001 From: Robert Knop Date: Thu, 4 Dec 2008 22:36:34 +0000 Subject: Merging from server/server-1.25 back to trunk. svn merge -r99446:104838 svn+ssh://svn.lindenlab.com/svn/linden/branches/server/server-1.25 Conflicts resolved by Prospero, except for one scary conflict in SendConfirmationEmail.php which was resolved by jarv. --- indra/llcommon/llapp.cpp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'indra/llcommon/llapp.cpp') diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 8826251617..c2f93b51ac 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -88,6 +88,12 @@ LLAppChildCallback LLApp::sDefaultChildCallback = NULL; LLApp::LLApp() : mThreadErrorp(NULL) +{ + commonCtor(); + startErrorThread(); +} + +void LLApp::commonCtor() { // Set our status to running setStatus(APP_STATUS_RUNNING); @@ -96,9 +102,9 @@ LLApp::LLApp() : mThreadErrorp(NULL) #if !LL_WINDOWS // This must be initialized before the error handler. - sSigChildCount = new LLAtomicU32(0); + sSigChildCount = new LLAtomicU32(0); #endif - + // Setup error handling setupErrorHandling(); @@ -118,6 +124,13 @@ LLApp::LLApp() : mThreadErrorp(NULL) // Set the application to this instance. sApplication = this; + +} + +LLApp::LLApp(LLErrorThread *error_thread) : + mThreadErrorp(error_thread) +{ + commonCtor(); } @@ -261,17 +274,20 @@ void LLApp::setupErrorHandling() #endif +} + +void LLApp::startErrorThread() +{ // // Start the error handling thread, which is responsible for taking action // when the app goes into the APP_STATUS_ERROR state // - llinfos << "LLApp::setupErrorHandling - Starting error thread" << llendl; + llinfos << "Starting error thread" << llendl; mThreadErrorp = new LLErrorThread(); mThreadErrorp->setUserData((void *) this); - mThreadErrorp->start(); + mThreadErrorp->start(); } - void LLApp::setErrorHandler(LLAppErrorHandler handler) { LLApp::sErrorHandler = handler; -- cgit v1.2.3