From abdc99f21b542c4fea67030ddbd7166c9d1c6c63 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Wed, 18 Feb 2009 21:10:16 +0000 Subject: Merge of QAR-1267 to trunk. This was a combo merge of QAR-1175 (maint-render-9) and QAR-1236 (dll-msvcrt-2) svn merge -r 109838:112264 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-render/maint-render-9-merge-r109833 --- indra/llmessage/llares.cpp | 20 ++++++++------------ indra/llmessage/llurlrequest.cpp | 10 ++++------ 2 files changed, 12 insertions(+), 18 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp index af6b7fee2c..fe37fe8142 100644 --- a/indra/llmessage/llares.cpp +++ b/indra/llmessage/llares.cpp @@ -470,9 +470,7 @@ bool LLAres::process(U64 timeout) int socks[ARES_GETSOCK_MAXNUM]; apr_pollfd_t aprFds[ARES_GETSOCK_MAXNUM]; - apr_int32_t nsds = 0; - apr_status_t status; - apr_pool_t *pool; + apr_int32_t nsds = 0; int nactive = 0; int bitmask; @@ -480,10 +478,12 @@ bool LLAres::process(U64 timeout) if (bitmask == 0) { - goto bail; + return nsds > 0; } - status = apr_pool_create(&pool, gAPRPoolp); + apr_status_t status; + LLAPRPool pool; + status = pool.getStatus() ; ll_apr_assert_status(status); for (int i = 0; i < ARES_GETSOCK_MAXNUM; i++) @@ -501,16 +501,16 @@ bool LLAres::process(U64 timeout) apr_socket_t *aprSock = NULL; - status = apr_os_sock_put(&aprSock, (apr_os_sock_t *) &socks[i], pool); + status = apr_os_sock_put(&aprSock, (apr_os_sock_t *) &socks[i], pool.getAPRPool()); if (status != APR_SUCCESS) { ll_apr_warn_status(status); - goto bail_pool; + return nsds > 0; } aprFds[nactive].desc.s = aprSock; aprFds[nactive].desc_type = APR_POLL_SOCKET; - aprFds[nactive].p = pool; + aprFds[nactive].p = pool.getAPRPool(); aprFds[nactive].rtnevents = 0; aprFds[nactive].client_data = &socks[i]; @@ -538,10 +538,6 @@ bool LLAres::process(U64 timeout) } } -bail_pool: - apr_pool_destroy(pool); - -bail: return nsds > 0; } diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 6ef97bea58..46e976fe35 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -44,7 +44,7 @@ #include "llsd.h" #include "llstring.h" #include "apr_env.h" - +#include "llapr.h" static const U32 HTTP_STATUS_PIPE_ERROR = 499; /** @@ -166,18 +166,16 @@ void LLURLRequest::useProxy(bool use_proxy) if (use_proxy && (env_proxy == NULL)) { apr_status_t status; - apr_pool_t* pool; - apr_pool_create(&pool, NULL); - status = apr_env_get(&env_proxy, "ALL_PROXY", pool); + LLAPRPool pool; + status = apr_env_get(&env_proxy, "ALL_PROXY", pool.getAPRPool()); if (status != APR_SUCCESS) { - status = apr_env_get(&env_proxy, "http_proxy", pool); + status = apr_env_get(&env_proxy, "http_proxy", pool.getAPRPool()); } if (status != APR_SUCCESS) { use_proxy = FALSE; } - apr_pool_destroy(pool); } -- cgit v1.2.3