From 053362e604c98c229df57337ba7752d4d6b97fa8 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 26 Jan 2015 14:46:20 +0100 Subject: Added network termination called at app exit. This fixes a crash in MSVC runtime caused by joining a thread in a global var's destructor. --- tests/Network/Google.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests/Network/Google.cpp') diff --git a/tests/Network/Google.cpp b/tests/Network/Google.cpp index 2b8830c24..54bfa6de4 100644 --- a/tests/Network/Google.cpp +++ b/tests/Network/Google.cpp @@ -7,6 +7,7 @@ #include #include "OSSupport/Event.h" #include "OSSupport/Network.h" +#include "OSSupport/NetworkSingleton.h" @@ -96,7 +97,7 @@ public: -int main() +void DoTest(void) { cEvent evtFinish; @@ -109,7 +110,19 @@ int main() LOGD("Connect request has been queued."); evtFinish.Wait(); +} + + + + + +int main() +{ + DoTest(); + + cNetworkSingleton::Get().Terminate(); LOGD("Network test finished"); + return 0; } -- cgit v1.2.3 From 591b4eeb8a82d1a15c22394683f151d4186489e4 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 20 Feb 2015 16:08:21 +0100 Subject: Network tests: Fixed clang warnings. --- tests/Network/Google.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/Network/Google.cpp') diff --git a/tests/Network/Google.cpp b/tests/Network/Google.cpp index 54bfa6de4..ab366f9e2 100644 --- a/tests/Network/Google.cpp +++ b/tests/Network/Google.cpp @@ -97,7 +97,7 @@ public: -void DoTest(void) +static void DoTest(void) { cEvent evtFinish; -- cgit v1.2.3