[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 59/78] qga-win: Handle VSS_E_PROVIDER_ALREADY_REGISTERED error
From: |
Michael Roth |
Subject: |
[PATCH 59/78] qga-win: Handle VSS_E_PROVIDER_ALREADY_REGISTERED error |
Date: |
Tue, 16 Jun 2020 09:15:28 -0500 |
From: Sameeh Jubran <sjubran@redhat.com>
This patch handles the case where VSS Provider is already registered,
where in such case qga uninstalls the provider and registers it again.
Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
Signed-off-by: Basil Salman <basil@daynix.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit b2413df83348acf371c03bced9a3845bba883ed5)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
qga/vss-win32/install.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp
index 6713e58670..a456841360 100644
--- a/qga/vss-win32/install.cpp
+++ b/qga/vss-win32/install.cpp
@@ -443,6 +443,17 @@ STDAPI DllRegisterServer(void)
VSS_PROV_SOFTWARE,
const_cast<WCHAR*>(QGA_PROVIDER_VERSION),
g_gProviderVersion);
+ if (hr == (long int) VSS_E_PROVIDER_ALREADY_REGISTERED) {
+ DllUnregisterServer();
+ hr = pVssAdmin->RegisterProvider(g_gProviderId, CLSID_QGAVSSProvider,
+ const_cast<WCHAR * >
+ (QGA_PROVIDER_LNAME),
+ VSS_PROV_SOFTWARE,
+ const_cast<WCHAR * >
+ (QGA_PROVIDER_VERSION),
+ g_gProviderVersion);
+ }
+
if (FAILED(hr)) {
errmsg_dialog(hr, "RegisterProvider failed");
}
--
2.17.1
- [PATCH 49/78] iotests/026: Test EIO on allocation in a data-file, (continued)
- [PATCH 49/78] iotests/026: Test EIO on allocation in a data-file, Michael Roth, 2020/06/16
- [PATCH 51/78] scsi/qemu-pr-helper: Fix out-of-bounds access to trnptid_list[], Michael Roth, 2020/06/16
- [PATCH 50/78] virtio: gracefully handle invalid region caches, Michael Roth, 2020/06/16
- [PATCH 52/78] block/qcow2-threads: fix qcow2_decompress, Michael Roth, 2020/06/16
- [PATCH 54/78] block/block-copy: fix progress calculation, Michael Roth, 2020/06/16
- [PATCH 53/78] job: refactor progress to separate object, Michael Roth, 2020/06/16
- [PATCH 56/78] block/io: fix bdrv_co_do_copy_on_readv, Michael Roth, 2020/06/16
- [PATCH 55/78] target/ppc: Fix rlwinm on ppc64, Michael Roth, 2020/06/16
- [PATCH 57/78] compat: disable edid on correct virtio-gpu device, Michael Roth, 2020/06/16
- [PATCH 58/78] qga: Installer: Wait for installation to finish, Michael Roth, 2020/06/16
- [PATCH 59/78] qga-win: Handle VSS_E_PROVIDER_ALREADY_REGISTERED error,
Michael Roth <=
- [PATCH 60/78] qga-win: prevent crash when executing guest-file-read with large count, Michael Roth, 2020/06/16
- [PATCH 05/78] target/arm: ensure we use current exception state after SCR update, Michael Roth, 2020/06/16
- [PATCH 61/78] qga: Fix undefined C behavior, Michael Roth, 2020/06/16
- [PATCH 62/78] qemu-ga: document vsock-listen in the man page, Michael Roth, 2020/06/16
- [PATCH 63/78] hw/i386/amd_iommu.c: Fix corruption of log events passed to guest, Michael Roth, 2020/06/16
- [PATCH 64/78] tcg/i386: Fix INDEX_op_dup2_vec, Michael Roth, 2020/06/16
- [PATCH 65/78] dump: Fix writing of ELF section, Michael Roth, 2020/06/16
- [PATCH 66/78] xen-block: Fix double qlist remove and request leak, Michael Roth, 2020/06/16
- [PATCH 67/78] vhost-user-gpu: Release memory returned by vu_queue_pop() with free(), Michael Roth, 2020/06/16
- [PATCH 68/78] target/ppc: Fix mtmsr(d) L=1 variant that loses interrupts, Michael Roth, 2020/06/16