[MSIEXEC] Sync with Wine Staging 1.9.4. CORE-10912
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 3 Mar 2016 14:29:43 +0000 (14:29 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 3 Mar 2016 14:29:43 +0000 (14:29 +0000)
svn path=/trunk/; revision=70893

reactos/base/system/msiexec/service.c
reactos/media/doc/README.WINE

index 1ffead6..3c8b690 100644 (file)
@@ -39,7 +39,9 @@ static BOOL UpdateSCMStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode,
     status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
     status.dwCurrentState = dwCurrentState;
 
     status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
     status.dwCurrentState = dwCurrentState;
 
-    if (dwCurrentState == SERVICE_START_PENDING)
+    if (dwCurrentState == SERVICE_START_PENDING
+            || dwCurrentState == SERVICE_STOP_PENDING
+            || dwCurrentState == SERVICE_STOPPED)
         status.dwControlsAccepted = 0;
     else
     {
         status.dwControlsAccepted = 0;
     else
     {
@@ -73,8 +75,6 @@ static BOOL UpdateSCMStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode,
 
 static void WINAPI ServiceCtrlHandler(DWORD code)
 {
 
 static void WINAPI ServiceCtrlHandler(DWORD code)
 {
-    DWORD state = SERVICE_RUNNING;
-
     WINE_TRACE("%u\n", code);
 
     switch (code)
     WINE_TRACE("%u\n", code);
 
     switch (code)
@@ -83,14 +83,12 @@ static void WINAPI ServiceCtrlHandler(DWORD code)
         case SERVICE_CONTROL_STOP:
             UpdateSCMStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
             KillService();
         case SERVICE_CONTROL_STOP:
             UpdateSCMStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
             KillService();
-            state = SERVICE_STOPPED;
             break;
         default:
             fprintf(stderr, "Unhandled service control code: %u\n", code);
             break;
         default:
             fprintf(stderr, "Unhandled service control code: %u\n", code);
+            UpdateSCMStatus(SERVICE_RUNNING, NO_ERROR, 0);
             break;
     }
             break;
     }
-
-    UpdateSCMStatus(state, NO_ERROR, 0);
 }
 
 static DWORD WINAPI ServiceExecutionThread(LPVOID param)
 }
 
 static DWORD WINAPI ServiceExecutionThread(LPVOID param)
@@ -142,10 +140,7 @@ static void WINAPI ServiceMain(DWORD argc, LPSTR *argv)
     }
 
     UpdateSCMStatus(SERVICE_RUNNING, NO_ERROR, 0);
     }
 
     UpdateSCMStatus(SERVICE_RUNNING, NO_ERROR, 0);
-
-    WaitForSingleObject(kill_event, INFINITE);
-    KillService();
-
+    WaitForSingleObject(thread, INFINITE);
     UpdateSCMStatus(SERVICE_STOPPED, NO_ERROR, 0);
 }
 
     UpdateSCMStatus(SERVICE_STOPPED, NO_ERROR, 0);
 }
 
index 9488c04..855df8f 100644 (file)
@@ -243,7 +243,7 @@ reactos/base/applications/winhlp32          # Synced to WineStaging-1.9.4
 reactos/base/applications/wordpad           # Synced to WineStaging-1.7.55
 reactos/base/services/rpcss                 # Synced to WineStaging-1.7.55
 reactos/base/system/expand                  # Synced to WineStaging-1.7.55
 reactos/base/applications/wordpad           # Synced to WineStaging-1.7.55
 reactos/base/services/rpcss                 # Synced to WineStaging-1.7.55
 reactos/base/system/expand                  # Synced to WineStaging-1.7.55
-reactos/base/system/msiexec                 # Synced to WineStaging-1.7.55
+reactos/base/system/msiexec                 # Synced to WineStaging-1.9.4
 reactos/modules/rosapps/winfile             # Autosync
 
 In addition the following libs, dlls and source files are mostly based on code ported
 reactos/modules/rosapps/winfile             # Autosync
 
 In addition the following libs, dlls and source files are mostly based on code ported