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:
Robert Shearman 2006-01-03 12:07:04 +01:00 committed by Alexandre Julliard
parent e1fd79bb89
commit 196829663a

View File

@ -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;
}