diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-08-19 13:47:50 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-08-19 17:02:27 -0500 |
commit | 1c4dc6b1cd2aa3ecd05fdb22f9889ed87e61cc68 (patch) | |
tree | 1018e1fded2b24a7adf98cdd31ff19a071a1edd0 /src/burn/engine/elevation.cpp | |
parent | 4a53029a94f706de48c6750481377f808724fe47 (diff) | |
download | wix-1c4dc6b1cd2aa3ecd05fdb22f9889ed87e61cc68.tar.gz wix-1c4dc6b1cd2aa3ecd05fdb22f9889ed87e61cc68.tar.bz2 wix-1c4dc6b1cd2aa3ecd05fdb22f9889ed87e61cc68.zip |
Resume automatic updates as part of ApplyUninitialize.
Fixes first half of 6870
Diffstat (limited to 'src/burn/engine/elevation.cpp')
-rw-r--r-- | src/burn/engine/elevation.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index ef9c6e97..e30a05bb 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp | |||
@@ -189,7 +189,8 @@ static HRESULT ElevatedProcessDetect( | |||
189 | ); | 189 | ); |
190 | static HRESULT OnApplyUninitialize( | 190 | static HRESULT OnApplyUninitialize( |
191 | __in HANDLE* phLock, | 191 | __in HANDLE* phLock, |
192 | __in BOOL* pfApplying | 192 | __in BOOL* pfApplying, |
193 | __in BOOL* pfDisabledAutomaticUpdates | ||
193 | ); | 194 | ); |
194 | static HRESULT OnSessionBegin( | 195 | static HRESULT OnSessionBegin( |
195 | __in BURN_CACHE* pCache, | 196 | __in BURN_CACHE* pCache, |
@@ -1543,7 +1544,6 @@ extern "C" HRESULT ElevationChildPumpMessages( | |||
1543 | __in BURN_REGISTRATION* pRegistration, | 1544 | __in BURN_REGISTRATION* pRegistration, |
1544 | __in BURN_USER_EXPERIENCE* pUserExperience, | 1545 | __in BURN_USER_EXPERIENCE* pUserExperience, |
1545 | __out HANDLE* phLock, | 1546 | __out HANDLE* phLock, |
1546 | __out BOOL* pfDisabledAutomaticUpdates, | ||
1547 | __out DWORD* pdwChildExitCode, | 1547 | __out DWORD* pdwChildExitCode, |
1548 | __out BOOL* pfRestart, | 1548 | __out BOOL* pfRestart, |
1549 | __out BOOL* pfApplying | 1549 | __out BOOL* pfApplying |
@@ -1554,6 +1554,7 @@ extern "C" HRESULT ElevationChildPumpMessages( | |||
1554 | BURN_ELEVATION_CHILD_MESSAGE_CONTEXT context = { }; | 1554 | BURN_ELEVATION_CHILD_MESSAGE_CONTEXT context = { }; |
1555 | HANDLE hCacheThread = NULL; | 1555 | HANDLE hCacheThread = NULL; |
1556 | BURN_PIPE_RESULT result = { }; | 1556 | BURN_PIPE_RESULT result = { }; |
1557 | BOOL fDisabledAutomaticUpdates = FALSE; | ||
1557 | 1558 | ||
1558 | cacheContext.dwLoggingTlsId = dwLoggingTlsId; | 1559 | cacheContext.dwLoggingTlsId = dwLoggingTlsId; |
1559 | cacheContext.hPipe = hCachePipe; | 1560 | cacheContext.hPipe = hCachePipe; |
@@ -1568,7 +1569,7 @@ extern "C" HRESULT ElevationChildPumpMessages( | |||
1568 | context.dwLoggingTlsId = dwLoggingTlsId; | 1569 | context.dwLoggingTlsId = dwLoggingTlsId; |
1569 | context.hPipe = hPipe; | 1570 | context.hPipe = hPipe; |
1570 | context.phLock = phLock; | 1571 | context.phLock = phLock; |
1571 | context.pfDisabledAutomaticUpdates = pfDisabledAutomaticUpdates; | 1572 | context.pfDisabledAutomaticUpdates = &fDisabledAutomaticUpdates; |
1572 | context.pfApplying = pfApplying; | 1573 | context.pfApplying = pfApplying; |
1573 | context.pApprovedExes = pApprovedExes; | 1574 | context.pApprovedExes = pApprovedExes; |
1574 | context.pCache = pCache; | 1575 | context.pCache = pCache; |
@@ -1595,6 +1596,11 @@ extern "C" HRESULT ElevationChildPumpMessages( | |||
1595 | LExit: | 1596 | LExit: |
1596 | ReleaseHandle(hCacheThread); | 1597 | ReleaseHandle(hCacheThread); |
1597 | 1598 | ||
1599 | if (fDisabledAutomaticUpdates) | ||
1600 | { | ||
1601 | ElevationChildResumeAutomaticUpdates(); | ||
1602 | } | ||
1603 | |||
1598 | return hr; | 1604 | return hr; |
1599 | } | 1605 | } |
1600 | 1606 | ||
@@ -2128,7 +2134,7 @@ static HRESULT ProcessElevatedChildMessage( | |||
2128 | break; | 2134 | break; |
2129 | 2135 | ||
2130 | case BURN_ELEVATION_MESSAGE_TYPE_APPLY_UNINITIALIZE: | 2136 | case BURN_ELEVATION_MESSAGE_TYPE_APPLY_UNINITIALIZE: |
2131 | hrResult = OnApplyUninitialize(pContext->phLock, pContext->pfApplying); | 2137 | hrResult = OnApplyUninitialize(pContext->phLock, pContext->pfApplying, pContext->pfDisabledAutomaticUpdates); |
2132 | break; | 2138 | break; |
2133 | 2139 | ||
2134 | case BURN_ELEVATION_MESSAGE_TYPE_SESSION_BEGIN: | 2140 | case BURN_ELEVATION_MESSAGE_TYPE_SESSION_BEGIN: |
@@ -2433,7 +2439,8 @@ LExit: | |||
2433 | 2439 | ||
2434 | static HRESULT OnApplyUninitialize( | 2440 | static HRESULT OnApplyUninitialize( |
2435 | __in HANDLE* phLock, | 2441 | __in HANDLE* phLock, |
2436 | __in BOOL* pfApplying | 2442 | __in BOOL* pfApplying, |
2443 | __in BOOL* pfDisabledAutomaticUpdates | ||
2437 | ) | 2444 | ) |
2438 | { | 2445 | { |
2439 | Assert(phLock); | 2446 | Assert(phLock); |
@@ -2442,6 +2449,13 @@ static HRESULT OnApplyUninitialize( | |||
2442 | 2449 | ||
2443 | *pfApplying = FALSE; | 2450 | *pfApplying = FALSE; |
2444 | 2451 | ||
2452 | if (*pfDisabledAutomaticUpdates) | ||
2453 | { | ||
2454 | *pfDisabledAutomaticUpdates = FALSE; | ||
2455 | |||
2456 | ElevationChildResumeAutomaticUpdates(); | ||
2457 | } | ||
2458 | |||
2445 | if (*phLock) | 2459 | if (*phLock) |
2446 | { | 2460 | { |
2447 | ::ReleaseMutex(*phLock); | 2461 | ::ReleaseMutex(*phLock); |