From: Tim Wiederhake Date: Wed, 5 May 2021 10:55:47 +0000 (+0200) Subject: virDomainGraphicsDefParseXMLSpice: Make name and mode mandatory X-Git-Tag: v7.4.0-rc1~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ecf7ff393991462e391c34a1cad9aeae4f87fa5;p=thirdparty%2Flibvirt.git virDomainGraphicsDefParseXMLSpice: Make name and mode mandatory Attributes are mandatory and were incorrectly made optional recently. Fixes: 2a5e16398eb622f30dabb16770d2e14b7a6d5212 Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4a2c83b6f7..58a46c5fa9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -12739,12 +12739,12 @@ virDomainGraphicsDefParseXMLSpice(virDomainGraphicsDef *def, if (virXMLPropEnum(node_list[i], "name", virDomainGraphicsSpiceChannelNameTypeFromString, - VIR_XML_PROP_NONE, &name) < 0) + VIR_XML_PROP_REQUIRED, &name) < 0) return -1; if (virXMLPropEnum(node_list[i], "mode", virDomainGraphicsSpiceChannelModeTypeFromString, - VIR_XML_PROP_NONE, &mode) < 0) + VIR_XML_PROP_REQUIRED, &mode) < 0) return -1; def->data.spice.channels[name] = mode;