diff options
Diffstat (limited to 'linden/indra/llplugin/llpluginsharedmemory.cpp')
-rwxr-xr-x | linden/indra/llplugin/llpluginsharedmemory.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/linden/indra/llplugin/llpluginsharedmemory.cpp b/linden/indra/llplugin/llpluginsharedmemory.cpp index e8a411a..6becb8d 100755 --- a/linden/indra/llplugin/llpluginsharedmemory.cpp +++ b/linden/indra/llplugin/llpluginsharedmemory.cpp | |||
@@ -84,6 +84,8 @@ | |||
84 | #include <sys/mman.h> | 84 | #include <sys/mman.h> |
85 | #include <errno.h> | 85 | #include <errno.h> |
86 | #elif USE_WIN32_SHARED_MEMORY | 86 | #elif USE_WIN32_SHARED_MEMORY |
87 | # define WIN32_LEAN_AND_MEAN | ||
88 | # include <winsock2.h> | ||
87 | #include <windows.h> | 89 | #include <windows.h> |
88 | #endif // USE_APR_SHARED_MEMORY | 90 | #endif // USE_APR_SHARED_MEMORY |
89 | 91 | ||
@@ -201,7 +203,8 @@ bool LLPluginSharedMemory::create(size_t size) | |||
201 | mName += createName(); | 203 | mName += createName(); |
202 | mSize = size; | 204 | mSize = size; |
203 | 205 | ||
204 | apr_status_t status = apr_shm_create( &(mImpl->mAprSharedMemory), mSize, mName.c_str(), gAPRPoolp ); | 206 | mPool.create(); |
207 | apr_status_t status = apr_shm_create( &(mImpl->mAprSharedMemory), mSize, mName.c_str(), mPool()); | ||
205 | 208 | ||
206 | if(ll_apr_warn_status(status)) | 209 | if(ll_apr_warn_status(status)) |
207 | { | 210 | { |
@@ -224,7 +227,7 @@ bool LLPluginSharedMemory::destroy(void) | |||
224 | } | 227 | } |
225 | mImpl->mAprSharedMemory = NULL; | 228 | mImpl->mAprSharedMemory = NULL; |
226 | } | 229 | } |
227 | 230 | mPool.destroy(); | |
228 | return true; | 231 | return true; |
229 | } | 232 | } |
230 | 233 | ||
@@ -233,7 +236,8 @@ bool LLPluginSharedMemory::attach(const std::string &name, size_t size) | |||
233 | mName = name; | 236 | mName = name; |
234 | mSize = size; | 237 | mSize = size; |
235 | 238 | ||
236 | apr_status_t status = apr_shm_attach( &(mImpl->mAprSharedMemory), mName.c_str(), gAPRPoolp ); | 239 | mPool.create(); |
240 | apr_status_t status = apr_shm_attach( &(mImpl->mAprSharedMemory), mName.c_str(), mPool() ); | ||
237 | 241 | ||
238 | if(ll_apr_warn_status(status)) | 242 | if(ll_apr_warn_status(status)) |
239 | { | 243 | { |
@@ -255,6 +259,7 @@ bool LLPluginSharedMemory::detach(void) | |||
255 | } | 259 | } |
256 | mImpl->mAprSharedMemory = NULL; | 260 | mImpl->mAprSharedMemory = NULL; |
257 | } | 261 | } |
262 | mPool.destroy(); | ||
258 | 263 | ||
259 | return true; | 264 | return true; |
260 | } | 265 | } |