Commit 19682966 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

rpcrt4: Fix race condition in RpcServerListen.

The DontWait parameter is used for forcing the function not to wait for the server to finish.
parent e1fd79bb
...@@ -977,6 +977,9 @@ RPC_STATUS WINAPI RpcServerListen( UINT MinimumCallThreads, UINT MaxCalls, UINT ...@@ -977,6 +977,9 @@ RPC_STATUS WINAPI RpcServerListen( UINT MinimumCallThreads, UINT MaxCalls, UINT
status = RPCRT4_start_listen(FALSE); status = RPCRT4_start_listen(FALSE);
if (status == RPC_S_OK)
RPCRT4_sync_with_server_thread();
if (DontWait || (status != RPC_S_OK)) return status; if (DontWait || (status != RPC_S_OK)) return status;
return RpcMgmtWaitServerListen(); return RpcMgmtWaitServerListen();
...@@ -998,8 +1001,6 @@ RPC_STATUS WINAPI RpcMgmtWaitServerListen( void ) ...@@ -998,8 +1001,6 @@ RPC_STATUS WINAPI RpcMgmtWaitServerListen( void )
LeaveCriticalSection(&listen_cs); LeaveCriticalSection(&listen_cs);
RPCRT4_sync_with_server_thread();
return RPC_S_OK; return RPC_S_OK;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment