diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2012-04-11 11:06:06 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2012-04-11 11:06:06 -0400 |
commit | 4743a2dac6af23a602c7ce8c5b5b0d351ae340e7 (patch) | |
tree | 8290203934beeb1ea5e37945a4749cf0e7eaca27 /indra/llmessage/llares.cpp | |
parent | 4574a9a008690c64158abd6d792d6d485bf0e235 (diff) | |
parent | 46a7cdd2866c4219bb690974d9d6266e6994b431 (diff) |
Automated merge with file:///home/nat/linden/viewer-leap-temp
Diffstat (limited to 'indra/llmessage/llares.cpp')
-rw-r--r-- | indra/llmessage/llares.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp index fab9858b69..5a67035ed1 100644 --- a/indra/llmessage/llares.cpp +++ b/indra/llmessage/llares.cpp @@ -28,7 +28,6 @@ #include "linden_common.h" #include "llares.h" -#include "llscopedvolatileaprpool.h" #include <ares_dns.h> #include <ares_version.h> @@ -465,6 +464,11 @@ void LLAres::search(const std::string &query, LLResType type, bool LLAres::process(U64 timeout) { + if (!gAPRPoolp) + { + ll_init_apr(); + } + ares_socket_t socks[ARES_GETSOCK_MAXNUM]; apr_pollfd_t aprFds[ARES_GETSOCK_MAXNUM]; apr_int32_t nsds = 0; @@ -478,7 +482,10 @@ bool LLAres::process(U64 timeout) return nsds > 0; } - LLScopedVolatileAPRPool scoped_pool; + apr_status_t status; + LLAPRPool pool; + status = pool.getStatus() ; + ll_apr_assert_status(status); for (int i = 0; i < ARES_GETSOCK_MAXNUM; i++) { @@ -495,7 +502,7 @@ bool LLAres::process(U64 timeout) apr_socket_t *aprSock = NULL; - apr_status_t status = apr_os_sock_put(&aprSock, (apr_os_sock_t *) &socks[i], scoped_pool); + status = apr_os_sock_put(&aprSock, (apr_os_sock_t *) &socks[i], pool.getAPRPool()); if (status != APR_SUCCESS) { ll_apr_warn_status(status); @@ -504,7 +511,7 @@ bool LLAres::process(U64 timeout) aprFds[nactive].desc.s = aprSock; aprFds[nactive].desc_type = APR_POLL_SOCKET; - aprFds[nactive].p = scoped_pool; + aprFds[nactive].p = pool.getAPRPool(); aprFds[nactive].rtnevents = 0; aprFds[nactive].client_data = &socks[i]; @@ -513,7 +520,7 @@ bool LLAres::process(U64 timeout) if (nactive > 0) { - apr_status_t status = apr_poll(aprFds, nactive, &nsds, timeout); + status = apr_poll(aprFds, nactive, &nsds, timeout); if (status != APR_SUCCESS && status != APR_TIMEUP) { |