diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-10-19 13:04:54 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-10-19 13:04:54 -0400 |
commit | 77876a3c4f18b480f9afd17be57b123d2e5f1e84 (patch) | |
tree | 04b31f26cceef5cc411b166d30eb694707d995aa /indra/test | |
parent | e0f6e449594c44511d9634ea54faf54f8fe5cb7c (diff) | |
parent | dd61baa3401a09bd8ff1e894514c15390946cdb3 (diff) |
Merged with viewer-development.
Diffstat (limited to 'indra/test')
-rw-r--r-- | indra/test/lltemplatemessagebuilder_tut.cpp | 2 | ||||
-rw-r--r-- | indra/test/message_tut.cpp | 2 | ||||
-rw-r--r-- | indra/test/test.cpp | 17 |
3 files changed, 16 insertions, 5 deletions
diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index fb3dd18fd3..6e1c82bb24 100644 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -29,6 +29,7 @@ #include "linden_common.h" #include "lltut.h" +#include "llapr.h" #include "llmessagetemplate.h" #include "llmath.h" #include "llquaternion.h" @@ -53,6 +54,7 @@ namespace tut static bool init = false; if(! init) { + ll_init_apr(); const F32 circuit_heartbeat_interval=5; const F32 circuit_timeout=100; diff --git a/indra/test/message_tut.cpp b/indra/test/message_tut.cpp index 9a6ccd4d68..d971b33475 100644 --- a/indra/test/message_tut.cpp +++ b/indra/test/message_tut.cpp @@ -29,6 +29,7 @@ #include "linden_common.h" #include "lltut.h" +#include "llapr.h" #include "llmessageconfig.h" #include "llsdserialize.h" #include "llversionserver.h" @@ -61,6 +62,7 @@ namespace tut static bool init = false; if(!init) { + ll_init_apr(); //init_prehash_data(); init = true; } diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 45e8aef99a..ffdb0cb976 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -37,8 +37,8 @@ #include "linden_common.h" #include "llerrorcontrol.h" #include "lltut.h" -#include "llaprpool.h" +#include "apr_pools.h" #include "apr_getopt.h" // the CTYPE_WORKAROUND is needed for linux dev stations that don't @@ -349,12 +349,17 @@ int main(int argc, char **argv) ctype_workaround(); #endif - LLAPRPool pool; - pool.create(); + apr_initialize(); + apr_pool_t* pool = NULL; + if(APR_SUCCESS != apr_pool_create(&pool, NULL)) + { + std::cerr << "Unable to initialize pool" << std::endl; + return 1; + } apr_getopt_t* os = NULL; - if(APR_SUCCESS != apr_getopt_init(&os, pool(), argc, argv)) + if(APR_SUCCESS != apr_getopt_init(&os, pool, argc, argv)) { - std::cerr << "Unable to initialize the arguments for parsing by apr_getopt()." << std::endl; + std::cerr << "Unable to pool" << std::endl; return 1; } @@ -472,6 +477,8 @@ int main(int argc, char **argv) s.close(); } + apr_terminate(); + int retval = (success ? 0 : 1); return retval; |