mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[SRVSVC][WKSSVC] Set the stop pending status before stopping the services and stop the RPC listener on shutdown as well.
This commit is contained in:
parent
1f082ecc68
commit
e0c97c9eca
2 changed files with 8 additions and 0 deletions
|
@ -79,6 +79,7 @@ ServiceControlHandler(DWORD dwControl,
|
|||
{
|
||||
case SERVICE_CONTROL_STOP:
|
||||
TRACE(" SERVICE_CONTROL_STOP received\n");
|
||||
UpdateServiceStatus(SERVICE_STOP_PENDING);
|
||||
/* Stop listening to incoming RPC messages */
|
||||
RpcMgmtStopServerListening(NULL);
|
||||
UpdateServiceStatus(SERVICE_STOPPED);
|
||||
|
@ -102,6 +103,9 @@ ServiceControlHandler(DWORD dwControl,
|
|||
|
||||
case SERVICE_CONTROL_SHUTDOWN:
|
||||
TRACE(" SERVICE_CONTROL_SHUTDOWN received\n");
|
||||
UpdateServiceStatus(SERVICE_STOP_PENDING);
|
||||
/* Stop listening to incoming RPC messages */
|
||||
RpcMgmtStopServerListening(NULL);
|
||||
UpdateServiceStatus(SERVICE_STOPPED);
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ ServiceControlHandler(DWORD dwControl,
|
|||
{
|
||||
case SERVICE_CONTROL_STOP:
|
||||
TRACE(" SERVICE_CONTROL_STOP received\n");
|
||||
UpdateServiceStatus(SERVICE_STOP_PENDING);
|
||||
/* Stop listening to incoming RPC messages */
|
||||
RpcMgmtStopServerListening(NULL);
|
||||
UpdateServiceStatus(SERVICE_STOPPED);
|
||||
|
@ -99,6 +100,9 @@ ServiceControlHandler(DWORD dwControl,
|
|||
|
||||
case SERVICE_CONTROL_SHUTDOWN:
|
||||
TRACE(" SERVICE_CONTROL_SHUTDOWN received\n");
|
||||
UpdateServiceStatus(SERVICE_STOP_PENDING);
|
||||
/* Stop listening to incoming RPC messages */
|
||||
RpcMgmtStopServerListening(NULL);
|
||||
UpdateServiceStatus(SERVICE_STOPPED);
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
|
|
Loading…
Reference in a new issue