From bf1e655172088eb372b23e968205cf9c8f841da2 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 29 Jul 2018 23:19:14 +0200 Subject: [PATCH] [ADVAPI32] Stop the service dispatcher thread only if a SERVICE_CONTROL_STOP command was sent --- dll/win32/advapi32/service/sctrl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dll/win32/advapi32/service/sctrl.c b/dll/win32/advapi32/service/sctrl.c index 8b28b2bffa6..f4a7aa85c43 100644 --- a/dll/win32/advapi32/service/sctrl.c +++ b/dll/win32/advapi32/service/sctrl.c @@ -602,9 +602,10 @@ ScServiceDispatcher(HANDLE hPipe, lpServiceName = (LPWSTR)((PBYTE)ControlPacket + ControlPacket->dwServiceNameOffset); TRACE("Service: %S\n", lpServiceName); - if (lpServiceName[0] == UNICODE_NULL) + if ((ControlPacket->dwControl == SERVICE_CONTROL_STOP) && + (lpServiceName[0] == UNICODE_NULL)) { - ERR("Stop dispatcher thread\n"); + TRACE("Stop dispatcher thread\n"); bRunning = FALSE; dwError = ERROR_SUCCESS; }