hyperv: bump minimum openwsman version to 2.6.3

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>
This commit is contained in:
Matt Coleman 2020-10-09 03:46:08 -04:00 committed by Michal Privoznik
parent a6d3e58bdf
commit 6fa53f02df
5 changed files with 5 additions and 32 deletions

View 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

View 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'

View 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);

View 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"));

View File

@ -21,27 +21,10 @@
#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);