From 3c341a11ab7b8f3fd18afcf3f50af6dfafa632c2 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Tue, 8 Jan 2013 00:25:07 -0800
Subject: SH-3468 WIP add memory tracking base class more fixes for unit test
 crashes added llcommon initialization/teardown for unit tests that indirectly
 trigger lltrace changed access of atomic refcount to use
 preincrement/decrement operators to reflect desired semantics always call
 apr_initialize in LLCommon::initClass, even if already initialized...apr does
 internal reference counting to keep things straight

---
 indra/test/lliohttpserver_tut.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'indra/test/lliohttpserver_tut.cpp')

diff --git a/indra/test/lliohttpserver_tut.cpp b/indra/test/lliohttpserver_tut.cpp
index 2fdc455f45..e7af09f80b 100644
--- a/indra/test/lliohttpserver_tut.cpp
+++ b/indra/test/lliohttpserver_tut.cpp
@@ -31,6 +31,7 @@
 #include "lliohttpserver.h"
 #include "llsdhttpserver.h"
 #include "llsdserialize.h"
+#include "llcommon.h"
 
 #include "llpipeutil.h"
 
@@ -76,11 +77,17 @@ namespace tut
 		HTTPServiceTestData()
 			: mResponse(NULL)
 		{
+			LLCommon::initClass();
 			LLHTTPStandardServices::useServices();
 			LLHTTPRegistrar::buildAllServices(mRoot);
 			mRoot.addNode("/delayed/echo", new DelayedEcho(this));
 			mRoot.addNode("/wire/hello", new LLHTTPNodeForPipe<WireHello>);
 		}
+
+		~HTTPServiceTestData()
+		{
+			LLCommon::cleanupClass();
+		}
 		
 		LLHTTPNode mRoot;
 		LLHTTPNode::ResponsePtr mResponse;
-- 
cgit v1.2.3


From 0ba9a00c3116b69745f2d5070ce772d5d4965dbf Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Tue, 8 Jan 2013 23:50:27 -0800
Subject: SH-3468 WIP add memory tracking base class cleaned up hacks used to
 get unit tests working LLTrace::init now supports recursive
 initialization/cleanup put NOMINMAX back in win32 header wrappers

---
 indra/test/lliohttpserver_tut.cpp | 2 --
 1 file changed, 2 deletions(-)

(limited to 'indra/test/lliohttpserver_tut.cpp')

diff --git a/indra/test/lliohttpserver_tut.cpp b/indra/test/lliohttpserver_tut.cpp
index e7af09f80b..3fa5c8dd42 100644
--- a/indra/test/lliohttpserver_tut.cpp
+++ b/indra/test/lliohttpserver_tut.cpp
@@ -77,7 +77,6 @@ namespace tut
 		HTTPServiceTestData()
 			: mResponse(NULL)
 		{
-			LLCommon::initClass();
 			LLHTTPStandardServices::useServices();
 			LLHTTPRegistrar::buildAllServices(mRoot);
 			mRoot.addNode("/delayed/echo", new DelayedEcho(this));
@@ -86,7 +85,6 @@ namespace tut
 
 		~HTTPServiceTestData()
 		{
-			LLCommon::cleanupClass();
 		}
 		
 		LLHTTPNode mRoot;
-- 
cgit v1.2.3