]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
hyperv: bump minimum openwsman version to 2.6.3
authorMatt Coleman <mcoleman@datto.com>
Fri, 9 Oct 2020 07:46:08 +0000 (03:46 -0400)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 9 Oct 2020 08:13:38 +0000 (10:13 +0200)
Bug fixes and comments specific to older versions have been removed.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
libvirt.spec.in
meson.build
src/hyperv/hyperv_driver.c
src/hyperv/hyperv_wmi.c
src/hyperv/openwsman.h

index 29f34f673aeb7271db92eb9bdcbe8f00771e4652..80563ce6ef0cd4b3e63f45a2089683ca273c2046 100644 (file)
@@ -363,7 +363,7 @@ BuildRequires: netcf-devel >= 0.2.2
 BuildRequires: libcurl-devel
 %endif
 %if %{with_hyperv}
-BuildRequires: libwsman-devel >= 2.2.3
+BuildRequires: libwsman-devel >= 2.6.3
 %endif
 BuildRequires: audit-libs-devel
 # we need /usr/sbin/dtrace
index a5ce8e17a899240367ba740194254080bf583a06..d0e977f7bd78028cb09eaf8873aa9a9a53e36bbd 100644 (file)
@@ -1207,7 +1207,7 @@ if numactl_dep.found()
   conf.set('WITH_NUMACTL', 1)
 endif
 
-openwsman_version = '2.2.3'
+openwsman_version = '2.6.3'
 openwsman_dep = dependency('openwsman', version: '>=' + openwsman_version, required: get_option('openwsman'))
 
 parallels_sdk_version = '7.0.22'
index dcde469442b84c792e6c876a037eaf0f56c0cf88..7db6802a55df12217663da1614f0f951847617d9 100644 (file)
@@ -383,10 +383,8 @@ hypervFreePrivate(hypervPrivate **priv)
     if (priv == NULL || *priv == NULL)
         return;
 
-    if ((*priv)->client != NULL) {
-        /* FIXME: This leaks memory due to bugs in openwsman <= 2.2.6 */
+    if ((*priv)->client != NULL)
         wsmc_release((*priv)->client);
-    }
 
     if ((*priv)->caps)
         virObjectUnref((*priv)->caps);
index b233dab58d0878a9ef65f6ca5916687390127ddb..6d0445184aa5620f420d24c8f33df22f9e6f3c9a 100644 (file)
@@ -1082,8 +1082,6 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery,
 
     if (data != NULL) {
 #if WS_SERIALIZER_FREE_MEM_WORKS
-        /* FIXME: ws_serializer_free_mem is broken in openwsman <= 2.2.6,
-         *        see hypervFreeObject for a detailed explanation. */
         if (ws_serializer_free_mem(serializerContext, data,
                                    wmiInfo->serializerInfo) < 0) {
             VIR_ERROR(_("Could not free deserialized data"));
@@ -1118,12 +1116,6 @@ hypervFreeObject(hypervPrivate *priv G_GNUC_UNUSED, hypervObject *object)
         next = object->next;
 
 #if WS_SERIALIZER_FREE_MEM_WORKS
-        /* FIXME: ws_serializer_free_mem is broken in openwsman <= 2.2.6,
-         *        but this is not that critical, because openwsman keeps
-         *        track of all allocations of the deserializer and frees
-         *        them in wsmc_release. So this doesn't result in a real
-         *        memory leak, but just in piling up unused memory until
-         *        the connection is closed. */
         if (ws_serializer_free_mem(serializerContext, object->data.common,
                                    object->info->serializerInfo) < 0) {
             VIR_ERROR(_("Could not free deserialized data"));
index cd7660ac2e7c74c7f6c7dcad02d7b053e05c0c35..c59c450ea62fa724c493e93819041d625601e3e4 100644 (file)
 
 #pragma once
 
-/* Workaround openwsman <= 2.2.6 unconditionally defining optarg. Just pretend
- * that u/os.h was already included. Need to explicitly include time.h because
- * wsman-xml-serializer.h needs it and u/os.h would have included it. */
-#include <time.h>
-#define _LIBU_OS_H_
 #include <wsman-api.h>
 
-/* wsman-xml-serializer.h in openwsman <= 2.2.6 is missing this defines */
-#ifndef SER_NS_INT8
-# define SER_NS_INT8(ns, n, x) SER_NS_INT8_FLAGS(ns, n, x, 0)
-#endif
-#ifndef SER_NS_INT16
-# define SER_NS_INT16(ns, n, x) SER_NS_INT16_FLAGS(ns, n, x, 0)
-#endif
-#ifndef SER_NS_INT32
-# define SER_NS_INT32(ns, n, x) SER_NS_INT32_FLAGS(ns, n, x, 0)
-#endif
-#ifndef SER_NS_INT64
-# define SER_NS_INT64(ns, n, x) SER_NS_INT64_FLAGS(ns, n, x, 0)
-#endif
-
 /* wsman-xml.h */
 WsXmlDocH ws_xml_create_doc(const char *rootNsUri, const char *rootName);
+
+/* wsman-xml-binding.h */
 WsXmlNodeH xml_parser_get_root(WsXmlDocH doc);