Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e1b2baf621..55920e7a7d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8303,9 +8303,9 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node,
{
int tlsCfgVal;
g_autofree char *protocol = NULL;
- g_autofree char *haveTLS = NULL;
g_autofree char *tlsCfg = NULL;
g_autofree char *sslverifystr = NULL;
+ virTristateBool haveTLS = VIR_TRISTATE_BOOL_ABSENT;
xmlNodePtr tmpnode;
if (!(protocol = virXMLPropString(node, "protocol"))) {
@@ -8327,12 +8327,9 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node,
return -1;
}
- if ((haveTLS = virXMLPropString(node, "tls")) &&
- (src->haveTLS = virTristateBoolTypeFromString(haveTLS)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
- _("unknown disk source 'tls' setting '%s'"),
haveTLS);
- return -1;
- }
+ if (virXMLPropYesNo(node, "tls", &haveTLS) < 0)
+ return -1;
+ src->haveTLS = haveTLS;
if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) &&
(tlsCfg = virXMLPropString(node, "tlsFromConfig"))) {
--
2.26.2