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/NameLookup.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/Network/NameLookup.cpp') diff --git a/tests/Network/NameLookup.cpp b/tests/Network/NameLookup.cpp index 822a96baf..16fa8042b 100644 --- a/tests/Network/NameLookup.cpp +++ b/tests/Network/NameLookup.cpp @@ -7,6 +7,7 @@ #include #include "OSSupport/Event.h" #include "OSSupport/Network.h" +#include "OSSupport/NetworkSingleton.h" @@ -45,7 +46,7 @@ public: -int main() +void DoTest(void) { cEvent evtFinish; @@ -70,7 +71,16 @@ int main() LOGD("IP lookup has been successfully queued"); evtFinish.Wait(); LOGD("IP lookup finished."); +} + + + + +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/NameLookup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/Network/NameLookup.cpp') diff --git a/tests/Network/NameLookup.cpp b/tests/Network/NameLookup.cpp index 16fa8042b..4781a59ec 100644 --- a/tests/Network/NameLookup.cpp +++ b/tests/Network/NameLookup.cpp @@ -46,7 +46,7 @@ public: -void DoTest(void) +static void DoTest(void) { cEvent evtFinish; -- cgit v1.2.3