summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewerlinux_api_dbus.cpp
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-10-19 13:04:54 -0400
committerLogan Dethrow <log@lindenlab.com>2011-10-19 13:04:54 -0400
commit77876a3c4f18b480f9afd17be57b123d2e5f1e84 (patch)
tree04b31f26cceef5cc411b166d30eb694707d995aa /indra/newview/llappviewerlinux_api_dbus.cpp
parente0f6e449594c44511d9634ea54faf54f8fe5cb7c (diff)
parentdd61baa3401a09bd8ff1e894514c15390946cdb3 (diff)
Merged with viewer-development.
Diffstat (limited to 'indra/newview/llappviewerlinux_api_dbus.cpp')
-rw-r--r--indra/newview/llappviewerlinux_api_dbus.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llappviewerlinux_api_dbus.cpp b/indra/newview/llappviewerlinux_api_dbus.cpp
index 1ae469dfcf..32e7e0a83d 100644
--- a/indra/newview/llappviewerlinux_api_dbus.cpp
+++ b/indra/newview/llappviewerlinux_api_dbus.cpp
@@ -27,11 +27,11 @@
#if LL_DBUS_ENABLED
#include "linden_common.h"
-#include "llaprpool.h"
extern "C" {
#include <dbus/dbus-glib.h>
+#include "apr_pools.h"
#include "apr_dso.h"
}
@@ -44,7 +44,7 @@ extern "C" {
#undef LL_DBUS_SYM
static bool sSymsGrabbed = false;
-static LLAPRPool sSymDBUSDSOMemoryPool;
+static apr_pool_t *sSymDBUSDSOMemoryPool = NULL;
static apr_dso_handle_t *sSymDBUSDSOHandleG = NULL;
bool grab_dbus_syms(std::string dbus_dso_name)
@@ -63,11 +63,11 @@ bool grab_dbus_syms(std::string dbus_dso_name)
#define LL_DBUS_SYM(REQUIRED, DBUSSYM, RTN, ...) do{rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll##DBUSSYM, sSymDBUSDSOHandle, #DBUSSYM); if (rv != APR_SUCCESS) {INFOMSG("Failed to grab symbol: %s", #DBUSSYM); if (REQUIRED) sym_error = true;} else DEBUGMSG("grabbed symbol: %s from %p", #DBUSSYM, (void*)ll##DBUSSYM);}while(0)
//attempt to load the shared library
- sSymDBUSDSOMemoryPool.create();
+ apr_pool_create(&sSymDBUSDSOMemoryPool, NULL);
if ( APR_SUCCESS == (rv = apr_dso_load(&sSymDBUSDSOHandle,
dbus_dso_name.c_str(),
- sSymDBUSDSOMemoryPool()) ))
+ sSymDBUSDSOMemoryPool) ))
{
INFOMSG("Found DSO: %s", dbus_dso_name.c_str());
@@ -109,7 +109,11 @@ void ungrab_dbus_syms()
sSymDBUSDSOHandleG = NULL;
}
- sSymDBUSDSOMemoryPool.destroy();
+ if ( sSymDBUSDSOMemoryPool )
+ {
+ apr_pool_destroy(sSymDBUSDSOMemoryPool);
+ sSymDBUSDSOMemoryPool = NULL;
+ }
// NULL-out all of the symbols we'd grabbed
#define LL_DBUS_SYM(REQUIRED, DBUSSYM, RTN, ...) do{ll##DBUSSYM = NULL;}while(0)