diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-02-10 12:06:01 -0500 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-02-10 12:06:01 -0500 |
| commit | 4849173fd87ff9199a0fee86dc6a43afe3936e71 (patch) | |
| tree | 7d765b6d9aeba3ba0388ac229a8f63aa7a4af607 /indra/llmessage/message.cpp | |
| parent | 028a05e79467e0c1fd7d63224fb447a964ab7a0b (diff) | |
| parent | 58348bd862163261fb650d8afd50fd1dc5e2695a (diff) | |
Merge daggy fix in rev a05866ebfea2 (Linux lib wildcards)
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; |
