diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-10-18 16:24:23 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-10-18 16:24:23 -0400 |
commit | 1f172281453171175dea76fc469a358e1e932b60 (patch) | |
tree | 0ba3c9b4ad692f1e133d8b2495f69ebe6daebce4 /indra/llmessage/message.cpp | |
parent | af0be560002d4de4d9d89709b5d3b4cc1aef31fc (diff) | |
parent | 9785506d56ced75011e8535148ef8a9b937d4970 (diff) |
merge
Diffstat (limited to 'indra/llmessage/message.cpp')
-rw-r--r-- | indra/llmessage/message.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 7d21e35f96..d0b0e178b8 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -97,10 +97,8 @@ std::string get_shared_secret(); class LLMessagePollInfo { public: - LLMessagePollInfo(void) : mPool(LLThread::tldata().mRootPool) { } apr_socket_t *mAPRSocketp; apr_pollfd_t mPollFD; - LLAPRPool mPool; }; namespace @@ -289,13 +287,20 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port, } // LL_DEBUGS("Messaging") << << "*** port: " << mPort << llendl; - mPollInfop = new LLMessagePollInfo; - + // + // Create the data structure that we can poll on + // + if (!gAPRPoolp) + { + LL_ERRS("Messaging") << "No APR pool before message system initialization!" << llendl; + ll_init_apr(); + } apr_socket_t *aprSocketp = NULL; - apr_os_sock_put(&aprSocketp, (apr_os_sock_t*)&mSocket, mPollInfop->mPool()); + apr_os_sock_put(&aprSocketp, (apr_os_sock_t*)&mSocket, gAPRPoolp); + mPollInfop = new LLMessagePollInfo; mPollInfop->mAPRSocketp = aprSocketp; - mPollInfop->mPollFD.p = mPollInfop->mPool(); + mPollInfop->mPollFD.p = gAPRPoolp; mPollInfop->mPollFD.desc_type = APR_POLL_SOCKET; mPollInfop->mPollFD.reqevents = APR_POLLIN; mPollInfop->mPollFD.rtnevents = 0; |