From d80ee102fba0f99ad2ab0e0e734267f76b3b639e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Jun 2012 12:26:34 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@685 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Mir_core/modules.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'plugins') diff --git a/plugins/Mir_core/modules.cpp b/plugins/Mir_core/modules.cpp index 0818e8916e..8f3a123e7c 100644 --- a/plugins/Mir_core/modules.cpp +++ b/plugins/Mir_core/modules.cpp @@ -555,17 +555,16 @@ MIR_CORE_DLL(INT_PTR) CallServiceSync(const char *name, WPARAM wParam, LPARAM lP // the service is looked up within the main thread, since the time it takes // for the APC queue to clear the service being called maybe removed. // even thou it may exists before the call, the critsec can't be locked between calls. - if (GetCurrentThreadId() != mainThreadId) { - mir_ptr item; - item->wParam = wParam; - item->lParam = lParam; - item->name = name; - item->hDoneEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - QueueMainThread(CallServiceToMainAPCFunc, &item, item->hDoneEvent); - return item->result; - } + if (GetCurrentThreadId() == mainThreadId) + return CallService(name, wParam, lParam); - return CallService(name, wParam, lParam); + mir_ptr item; + item->wParam = wParam; + item->lParam = lParam; + item->name = name; + item->hDoneEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + QueueMainThread(CallServiceToMainAPCFunc, item, item->hDoneEvent); + return item->result; } MIR_CORE_DLL(int) CallFunctionAsync(void (__stdcall *func)(void *), void *arg) -- cgit v1.2.3