summaryrefslogtreecommitdiff
path: root/indra/llmessage/llares.cpp
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2009-02-18 21:10:16 +0000
committerBrad Kittenbrink <brad@lindenlab.com>2009-02-18 21:10:16 +0000
commitabdc99f21b542c4fea67030ddbd7166c9d1c6c63 (patch)
tree3e984e405adfdec189ca8a047daca5250737ffbf /indra/llmessage/llares.cpp
parent34412f0530cf6a411b4de906a8e9da59cbcb3a85 (diff)
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
Diffstat (limited to 'indra/llmessage/llares.cpp')
-rw-r--r--indra/llmessage/llares.cpp20
1 files changed, 8 insertions, 12 deletions
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;
}