From 8eacbef11b058c3c73968efa5c4aa3e877bf5739 Mon Sep 17 00:00:00 2001 From: DavidXanatos Date: Thu, 6 Jan 2022 19:06:47 +0100 Subject: [PATCH] 1.0.7 --- Sandboxie/install/kmdutil/kmdutil.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Sandboxie/install/kmdutil/kmdutil.c b/Sandboxie/install/kmdutil/kmdutil.c index 0ae9b564..b1ed3b55 100644 --- a/Sandboxie/install/kmdutil/kmdutil.c +++ b/Sandboxie/install/kmdutil/kmdutil.c @@ -679,13 +679,15 @@ BOOL Kmd_Stop_Service( service, SERVICE_CONTROL_STOP, &service_status)) { - if ((GetLastError() == ERROR_SERVICE_REQUEST_TIMEOUT || - GetLastError() == ERROR_SERVICE_NOT_ACTIVE || - GetLastError() == ERROR_PIPE_BUSY)) - continue; + if (GetLastError() == ERROR_SERVICE_NOT_ACTIVE) + return TRUE; - Display_Error(L"ControlService Stop", 0); - return FALSE; + if (!(GetLastError() == ERROR_SERVICE_REQUEST_TIMEOUT || + GetLastError() == ERROR_PIPE_BUSY)){ + + Display_Error(L"ControlService Stop", 0); + return FALSE; + } } Sleep(500);