[Wine-patches] [eterhack] ole32: Remove ready_event (eterbug #41).
Alexander Morozov
amorozov на etersoft.ru
Пн Июл 25 19:26:01 MSD 2011
----------- следующая часть -----------
From 335d949a9844f1c2c9bd72cd2f561cebe8913099 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Mon, 25 Jul 2011 19:22:29 +0400
Subject: [eterhack] ole32: Remove ready_event (eterbug #41).
---
dlls/ole32/rpc.c | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c
index 9bb508b..9b760f0 100644
--- a/dlls/ole32/rpc.c
+++ b/dlls/ole32/rpc.c
@@ -1869,7 +1869,6 @@ struct local_server_params
{
CLSID clsid;
IStream *stream;
- HANDLE ready_event;
HANDLE stop_event;
HANDLE thread;
BOOL multi_use;
@@ -1899,8 +1898,7 @@ static DWORD WINAPI local_server_thread(LPVOID param)
get_localserver_pipe_name(pipefn, &lsp->clsid);
ovl.hEvent = pipe_event = CreateEventW(NULL, FALSE, FALSE, NULL);
- SetEvent(lsp->ready_event);
- /* Clients trying to connect between now and CreateNamedPipeW() will
+ /* Clients trying to connect before CreateNamedPipeW() will
* fail and will have to retry. See also the end of the loop.
*/
while (1) {
@@ -2006,16 +2004,9 @@ HRESULT RPC_StartLocalServer(REFCLSID clsid, IStream *stream, BOOL multi_use, vo
lsp->clsid = *clsid;
lsp->stream = stream;
IStream_AddRef(stream);
- lsp->ready_event = CreateEventW(NULL, FALSE, FALSE, NULL);
- if (!lsp->ready_event)
- {
- HeapFree(GetProcessHeap(), 0, lsp);
- return HRESULT_FROM_WIN32(GetLastError());
- }
lsp->stop_event = CreateEventW(NULL, FALSE, FALSE, NULL);
if (!lsp->stop_event)
{
- CloseHandle(lsp->ready_event);
HeapFree(GetProcessHeap(), 0, lsp);
return HRESULT_FROM_WIN32(GetLastError());
}
@@ -2024,16 +2015,11 @@ HRESULT RPC_StartLocalServer(REFCLSID clsid, IStream *stream, BOOL multi_use, vo
lsp->thread = CreateThread(NULL, 0, local_server_thread, lsp, 0, &tid);
if (!lsp->thread)
{
- CloseHandle(lsp->ready_event);
CloseHandle(lsp->stop_event);
HeapFree(GetProcessHeap(), 0, lsp);
return HRESULT_FROM_WIN32(GetLastError());
}
- WaitForSingleObject(lsp->ready_event, INFINITE);
- CloseHandle(lsp->ready_event);
- lsp->ready_event = NULL;
-
*registration = lsp;
return S_OK;
}
--
1.7.5.4
Подробная информация о списке рассылки Wine-patches