From 152d0fb01323c334e58b4da717fc80939f8de999 Mon Sep 17 00:00:00 2001 From: paulc Date: Fri, 2 Sep 2011 18:06:56 +0000 Subject: [PATCH] Check the number of plugins still loaded at shutdown, newer glibc sucks badly! Warn if at shutdown there are mutexes locked or plugins loaded. git-svn-id: http://yate.null.ro/svn/yate/trunk@4587 acf43c95-373e-0410-b603-e72c3f656dc1 --- engine/Engine.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/Engine.cpp b/engine/Engine.cpp index b055a685..6df4f05b 100644 --- a/engine/Engine.cpp +++ b/engine/Engine.cpp @@ -1008,7 +1008,6 @@ Engine::~Engine() assert(this == s_self); m_dispatcher.clear(); m_libs.clear(); - plugins.clear(); s_mode = Stopped; s_self = 0; } @@ -1241,7 +1240,11 @@ int Engine::run() ::signal(SIGQUIT,SIG_DFL); #endif delete this; - Debug(DebugAll,"Exiting with %d locked mutexes",Mutex::locks()); + int mux = Mutex::locks(); + unsigned int cnt = plugins.count(); + plugins.clear(); + if (mux || cnt) + Debug(DebugGoOn,"Exiting with %d locked mutexes and %u plugins loaded!",mux,cnt); #ifdef _WINDOWS ::WSACleanup(); #endif