diff options
author | Debi King (Dessie) <dessie@lindenlab.com> | 2011-10-16 08:19:49 -0400 |
---|---|---|
committer | Debi King (Dessie) <dessie@lindenlab.com> | 2011-10-16 08:19:49 -0400 |
commit | bf96c7f67e623b09f83b2300e7b82cb04dce1ee3 (patch) | |
tree | 3d3ff515c4055877d2f1158287ddaf9dd5107a13 /indra/llmessage/message.cpp | |
parent | 76a54429fef78bb36ef5d4189e78867a7002f058 (diff) | |
parent | 4924f0c99b021869967f4587df703084d2bdc8ed (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; |