diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-11-18 12:33:07 -0500 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-11-18 12:33:07 -0500 |
commit | 182566800a834df8cb12fb03a869b216ad13cd84 (patch) | |
tree | afa934d25d9b683b3fa155ad2eba1ccfb612e544 /indra/test | |
parent | 3819c3b049abb0771c7129c0a11a8fcd0725f9fd (diff) |
Re-added some missing calls to apr_pool_destroy() that I failed to readd after the thread local storage rollback. Also added a call to LLProxy::cleanupClass() to prevent indra/test from segfaulting on exit.
Diffstat (limited to 'indra/test')
-rw-r--r-- | indra/test/io.cpp | 10 | ||||
-rw-r--r-- | indra/test/llhttpclient_tut.cpp | 5 | ||||
-rw-r--r-- | indra/test/lliohttpserver_tut.cpp | 8 |
3 files changed, 16 insertions, 7 deletions
diff --git a/indra/test/io.cpp b/indra/test/io.cpp index 38f86b9e57..ce747f667d 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -838,6 +838,7 @@ namespace tut { mChain.clear(); delete mPump; + apr_pool_destroy(mPool); } }; typedef test_group<PumpAndChainTestData> PumpAndChainTestGroup; @@ -908,9 +909,8 @@ namespace tut pipe_and_pump_fitness() { - apr_pool_create(&mPool, NULL); - LLFrameTimer::updateFrameTime(); + apr_pool_create(&mPool, NULL); mPump = new LLPumpIO(mPool); mSocket = LLSocket::create( mPool, @@ -922,6 +922,7 @@ namespace tut { mSocket.reset(); delete mPump; + apr_pool_destroy(mPool); } protected: @@ -1248,13 +1249,14 @@ namespace tut } }; + apr_pool_t* mPool; LLPumpIO* mPump; LLPumpIO::chain_t mChain; LLSimpleRPCClient* mClient; LLSD mResponse; - apr_pool_t* mPool; rpc_server_data() : + mPool(NULL), mPump(NULL), mClient(NULL) { @@ -1274,6 +1276,8 @@ namespace tut mChain.clear(); delete mPump; mPump = NULL; + apr_pool_destroy(mPool); + mPool = NULL; } void pump_loop(const LLSD& request) { diff --git a/indra/test/llhttpclient_tut.cpp b/indra/test/llhttpclient_tut.cpp index 16a73c03cb..4b4046632c 100644 --- a/indra/test/llhttpclient_tut.cpp +++ b/indra/test/llhttpclient_tut.cpp @@ -36,11 +36,11 @@ // These are too slow on Windows to actually include in the build. JC #if !LL_WINDOWS -#include "llapr.h" #include "lltut.h" #include "llhttpclient.h" #include "llformat.h" #include "llpipeutil.h" +#include "llproxy.h" #include "llpumpio.h" #include "llsdhttpserver.h" @@ -89,6 +89,7 @@ namespace tut LLCurl::initClass(false); mServerPump = new LLPumpIO(mPool); mClientPump = new LLPumpIO(mPool); + LLHTTPClient::setPump(*mClientPump); } @@ -96,6 +97,8 @@ namespace tut { delete mServerPump; delete mClientPump; + LLProxy::cleanupClass(); + apr_pool_destroy(mPool); } void setupTheServer() diff --git a/indra/test/lliohttpserver_tut.cpp b/indra/test/lliohttpserver_tut.cpp index d12733dbee..2fdc455f45 100644 --- a/indra/test/lliohttpserver_tut.cpp +++ b/indra/test/lliohttpserver_tut.cpp @@ -76,14 +76,12 @@ namespace tut HTTPServiceTestData() : mResponse(NULL) { - apr_pool_create(&mPool, NULL); LLHTTPStandardServices::useServices(); LLHTTPRegistrar::buildAllServices(mRoot); mRoot.addNode("/delayed/echo", new DelayedEcho(this)); mRoot.addNode("/wire/hello", new LLHTTPNodeForPipe<WireHello>); } - apr_pool_t* mPool; LLHTTPNode mRoot; LLHTTPNode::ResponsePtr mResponse; LLSD mResult; @@ -106,8 +104,11 @@ namespace tut LLPipeStringInjector* injector = new LLPipeStringInjector(httpRequest); LLPipeStringExtractor* extractor = new LLPipeStringExtractor(); + apr_pool_t* pool; + apr_pool_create(&pool, NULL); + LLPumpIO* pump; - pump = new LLPumpIO(mPool); + pump = new LLPumpIO(pool); LLPumpIO::chain_t chain; LLSD context; @@ -130,6 +131,7 @@ namespace tut chain.clear(); delete pump; + apr_pool_destroy(pool); if(mResponse.notNull() && timeout) { |