summaryrefslogtreecommitdiff
path: root/indra/llcommon/llapr.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <none@none>2018-02-12 21:15:00 +0200
committerAndreyL ProductEngine <none@none>2018-02-12 21:15:00 +0200
commite6765df1baa40a46b77e5362c8855a336125e5f7 (patch)
treeffb3564aaa95b23f0d7ab6f6eeea8d08f3e9b317 /indra/llcommon/llapr.cpp
parentb0950991988ddd56bec9074316d883a00b0cae4c (diff)
parent02342cb9ae3140cb49ec2818fee5692b3796bf8a (diff)
Merged in lindenlab/viewer-bear
Diffstat (limited to 'indra/llcommon/llapr.cpp')
-rw-r--r--indra/llcommon/llapr.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp
index 86f407cdb0..d353d06de2 100644
--- a/indra/llcommon/llapr.cpp
+++ b/indra/llcommon/llapr.cpp
@@ -291,37 +291,20 @@ void LLScopedLock::unlock()
//---------------------------------------------------------------------
-bool ll_apr_warn_status(apr_status_t status)
+bool _ll_apr_warn_status(apr_status_t status, const char* file, int line)
{
if(APR_SUCCESS == status) return false;
#if !LL_LINUX
char buf[MAX_STRING]; /* Flawfinder: ignore */
apr_strerror(status, buf, sizeof(buf));
- LL_WARNS("APR") << "APR: " << buf << LL_ENDL;
+ LL_WARNS("APR") << "APR: " << file << ":" << line << " " << buf << LL_ENDL;
#endif
return true;
}
-bool ll_apr_warn_status(apr_status_t status, apr_dso_handle_t *handle)
+void _ll_apr_assert_status(apr_status_t status, const char* file, int line)
{
- 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));
-}
-
-void ll_apr_assert_status(apr_status_t status, apr_dso_handle_t *handle)
-{
- llassert(! ll_apr_warn_status(status, handle));
+ llassert(! _ll_apr_warn_status(status, file, line));
}
//---------------------------------------------------------------------