mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 14:34:57 +08: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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user