virDomainGraphicsDefParseXMLSpice: Make name and mode mandatory

Attributes are mandatory and were incorrectly made optional recently.

Fixes: 2a5e16398eb622f30dabb16770d2e14b7a6d5212
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-05-05 12:55:47 +02:00 committed by Michal Privoznik
parent 4647ac4205
commit 4ecf7ff393

View File

@ -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;