From d7e550f551052ae4233e48a41448b8a155b8e013 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 31 Jan 2014 19:11:17 +0000 Subject: debug print added for the threads being forcibly killed git-svn-id: http://svn.miranda-ng.org/main/trunk@7977 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/threads.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mir_core') diff --git a/src/mir_core/threads.cpp b/src/mir_core/threads.cpp index 568ef30563..63049126e5 100644 --- a/src/mir_core/threads.cpp +++ b/src/mir_core/threads.cpp @@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h" +#include + ///////////////////////////////////////////////////////////////////////////////////////// // APC and mutex functions @@ -227,6 +229,9 @@ MIR_CORE_DLL(void) KillObjectThreads(void* owner) for (int j = threads.getCount()-1; j >= 0; j--) { THREAD_WAIT_ENTRY* p = threads[j]; if (p->pObject == owner) { + char szModuleName[MAX_PATH]; + GetModuleFileNameA(p->hOwner, szModuleName, sizeof(szModuleName)); + Netlib_Logf(0, "Killing objec thread %s:%p", szModuleName, p->dwThreadId); TerminateThread(p->hThread, 9999); CloseHandle(p->hThread); threads.remove(j); @@ -247,6 +252,7 @@ static void CALLBACK KillAllThreads(HWND, UINT, UINT_PTR, DWORD) THREAD_WAIT_ENTRY *p = threads[j]; char szModuleName[ MAX_PATH ]; GetModuleFileNameA(p->hOwner, szModuleName, sizeof(szModuleName)); + Netlib_Logf(0, "Killing thread %s:%p", szModuleName, p->dwThreadId); TerminateThread(p->hThread, 9999); CloseHandle(p->hThread); mir_free(p); -- cgit v1.2.3