aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llimage/llimagej2c.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llimage/llimagej2c.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/linden/indra/llimage/llimagej2c.cpp b/linden/indra/llimage/llimagej2c.cpp
index b99ebff..9e88bcd 100644
--- a/linden/indra/llimage/llimagej2c.cpp
+++ b/linden/indra/llimage/llimagej2c.cpp
@@ -46,7 +46,7 @@ typedef const char* (*EngineInfoLLImageJ2CFunction)();
46CreateLLImageJ2CFunction j2cimpl_create_func; 46CreateLLImageJ2CFunction j2cimpl_create_func;
47DestroyLLImageJ2CFunction j2cimpl_destroy_func; 47DestroyLLImageJ2CFunction j2cimpl_destroy_func;
48EngineInfoLLImageJ2CFunction j2cimpl_engineinfo_func; 48EngineInfoLLImageJ2CFunction j2cimpl_engineinfo_func;
49apr_pool_t *j2cimpl_dso_memory_pool; 49AIAPRPool j2cimpl_dso_memory_pool;
50apr_dso_handle_t *j2cimpl_dso_handle; 50apr_dso_handle_t *j2cimpl_dso_handle;
51 51
52//Declare the prototype for theses functions here, their functionality 52//Declare the prototype for theses functions here, their functionality
@@ -81,13 +81,12 @@ void LLImageJ2C::openDSO()
81 gDirUtilp->getExecutableDir()); 81 gDirUtilp->getExecutableDir());
82 82
83 j2cimpl_dso_handle = NULL; 83 j2cimpl_dso_handle = NULL;
84 j2cimpl_dso_memory_pool = NULL; 84 j2cimpl_dso_memory_pool.create();
85 85
86 //attempt to load the shared library 86 //attempt to load the shared library
87 apr_pool_create(&j2cimpl_dso_memory_pool, NULL);
88 rv = apr_dso_load(&j2cimpl_dso_handle, 87 rv = apr_dso_load(&j2cimpl_dso_handle,
89 dso_path.c_str(), 88 dso_path.c_str(),
90 j2cimpl_dso_memory_pool); 89 j2cimpl_dso_memory_pool());
91 90
92 //now, check for success 91 //now, check for success
93 if ( rv == APR_SUCCESS ) 92 if ( rv == APR_SUCCESS )
@@ -151,11 +150,7 @@ void LLImageJ2C::openDSO()
151 j2cimpl_dso_handle = NULL; 150 j2cimpl_dso_handle = NULL;
152 } 151 }
153 152
154 if ( j2cimpl_dso_memory_pool ) 153 j2cimpl_dso_memory_pool.destroy();
155 {
156 apr_pool_destroy(j2cimpl_dso_memory_pool);
157 j2cimpl_dso_memory_pool = NULL;
158 }
159 } 154 }
160} 155}
161 156
@@ -163,7 +158,7 @@ void LLImageJ2C::openDSO()
163void LLImageJ2C::closeDSO() 158void LLImageJ2C::closeDSO()
164{ 159{
165 if ( j2cimpl_dso_handle ) apr_dso_unload(j2cimpl_dso_handle); 160 if ( j2cimpl_dso_handle ) apr_dso_unload(j2cimpl_dso_handle);
166 if (j2cimpl_dso_memory_pool) apr_pool_destroy(j2cimpl_dso_memory_pool); 161 j2cimpl_dso_memory_pool.destroy();
167} 162}
168 163
169//static 164//static