summaryrefslogtreecommitdiff
path: root/indra/llmessage/message.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-10-19 10:47:55 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-10-19 10:47:55 -0400
commit444bdef6d4949b6381b8706ab056588bc6bd88eb (patch)
tree1f72cc9ec78d7b8c4bad57f4ef14c12a04b7a3a0 /indra/llmessage/message.cpp
parentaf0be560002d4de4d9d89709b5d3b4cc1aef31fc (diff)
parentdd61baa3401a09bd8ff1e894514c15390946cdb3 (diff)
merge
Diffstat (limited to 'indra/llmessage/message.cpp')
-rw-r--r--indra/llmessage/message.cpp17
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;