mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
rpcrt4: Fix race condition in RpcServerListen.
The DontWait parameter is used for forcing the function not to wait for the server to finish.
This commit is contained in:
parent
e1fd79bb89
commit
196829663a
@ -977,6 +977,9 @@ RPC_STATUS WINAPI RpcServerListen( UINT MinimumCallThreads, UINT MaxCalls, UINT
|
||||
|
||||
status = RPCRT4_start_listen(FALSE);
|
||||
|
||||
if (status == RPC_S_OK)
|
||||
RPCRT4_sync_with_server_thread();
|
||||
|
||||
if (DontWait || (status != RPC_S_OK)) return status;
|
||||
|
||||
return RpcMgmtWaitServerListen();
|
||||
@ -998,8 +1001,6 @@ RPC_STATUS WINAPI RpcMgmtWaitServerListen( void )
|
||||
|
||||
LeaveCriticalSection(&listen_cs);
|
||||
|
||||
RPCRT4_sync_with_server_thread();
|
||||
|
||||
return RPC_S_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user