diff options
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llapr.cpp | 22 | ||||
-rw-r--r-- | indra/llcommon/llapr.h | 5 | ||||
-rw-r--r-- | indra/llcommon/llevents.cpp | 4 | ||||
-rw-r--r-- | indra/llcommon/llprocesslauncher.cpp | 9 | ||||
-rw-r--r-- | indra/llcommon/llqueuedthread.h | 2 | ||||
-rw-r--r-- | indra/llcommon/llversionviewer.h | 2 |
6 files changed, 31 insertions, 13 deletions
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index 66ec5bad2c..d1c44c9403 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -28,6 +28,7 @@ #include "linden_common.h" #include "llapr.h" +#include "apr_dso.h" apr_pool_t *gAPRPoolp = NULL; // Global APR memory pool LLVolatileAPRPool *LLAPRFile::sAPRFilePoolp = NULL ; //global volatile APR memory pool. @@ -279,14 +280,31 @@ bool ll_apr_warn_status(apr_status_t status) { if(APR_SUCCESS == status) return false; char buf[MAX_STRING]; /* Flawfinder: ignore */ - apr_strerror(status, buf, MAX_STRING); + apr_strerror(status, buf, sizeof(buf)); LL_WARNS("APR") << "APR: " << buf << LL_ENDL; return true; } +bool ll_apr_warn_status(apr_status_t status, apr_dso_handle_t *handle) +{ + bool result = ll_apr_warn_status(status); + // Despite observed truncation of actual Mac dylib load errors, increasing + // this buffer to more than MAX_STRING doesn't help: it appears that APR + // stores the output in a fixed 255-character internal buffer. (*sigh*) + char buf[MAX_STRING]; /* Flawfinder: ignore */ + apr_dso_error(handle, buf, sizeof(buf)); + LL_WARNS("APR") << "APR: " << buf << LL_ENDL; + return result; +} + void ll_apr_assert_status(apr_status_t status) { - llassert(ll_apr_warn_status(status) == false); + llassert(! ll_apr_warn_status(status)); +} + +void ll_apr_assert_status(apr_status_t status, apr_dso_handle_t *handle) +{ + llassert(! ll_apr_warn_status(status, handle)); } //--------------------------------------------------------------------- diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index 4930270af8..af33ce666f 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -53,6 +53,8 @@ extern LL_COMMON_API apr_thread_mutex_t* gLogMutexp; extern apr_thread_mutex_t* gCallStacksLogMutexp; +struct apr_dso_handle_t; + /** * @brief initialize the common apr constructs -- apr itself, the * global pool, and a mutex. @@ -259,8 +261,11 @@ public: * @return Returns <code>true</code> if status is an error condition. */ bool LL_COMMON_API ll_apr_warn_status(apr_status_t status); +/// There's a whole other APR error-message function if you pass a DSO handle. +bool LL_COMMON_API ll_apr_warn_status(apr_status_t status, apr_dso_handle_t* handle); void LL_COMMON_API ll_apr_assert_status(apr_status_t status); +void LL_COMMON_API ll_apr_assert_status(apr_status_t status, apr_dso_handle_t* handle); extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index 84a6620a77..97e2bdeb57 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -475,7 +475,7 @@ void LLEventPump::stopListening(const std::string& name) *****************************************************************************/ bool LLEventStream::post(const LLSD& event) { - if (! mEnabled) + if (! mEnabled || !mSignal) { return false; } @@ -515,6 +515,8 @@ bool LLEventQueue::post(const LLSD& event) void LLEventQueue::flush() { + if(!mSignal) return; + // Consider the case when a given listener on this LLEventQueue posts yet // another event on the same queue. If we loop over mEventQueue directly, // we'll end up processing all those events during the same flush() call diff --git a/indra/llcommon/llprocesslauncher.cpp b/indra/llcommon/llprocesslauncher.cpp index 81e5f8820d..4b0f6b0251 100644 --- a/indra/llcommon/llprocesslauncher.cpp +++ b/indra/llcommon/llprocesslauncher.cpp @@ -265,14 +265,7 @@ int LLProcessLauncher::launch(void) delete[] fake_argv; mProcessID = id; - - // At this point, the child process will have been created (since that's how vfork works -- the child borrowed our execution context until it forked) - // If the process doesn't exist at this point, the exec failed. - if(!isRunning()) - { - result = -1; - } - + return result; } diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h index c75e0e2bbf..a53b22f6fc 100644 --- a/indra/llcommon/llqueuedthread.h +++ b/indra/llcommon/llqueuedthread.h @@ -179,7 +179,7 @@ public: void waitOnPending(); void printQueueStats(); - S32 getPending(); + virtual S32 getPending(); bool getThreaded() { return mThreaded ? true : false; } // Request accessors diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index d6fa5b1997..356e0f4c0f 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -35,7 +35,7 @@ const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; #if LL_DARWIN -const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.snowglobe.viewer"; +const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.indra.viewer"; #endif #endif |