Re: [PATCH] conf: Fix incorrect spice graphic XML format on compression options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24.05.2011 13:43, Michal Privoznik wrote:
> If spice graphics has no <channel> elements, the output graphics XML
> is messed up. To prevent this, we need to end the <graphics> element
By messing up I mean something like this:
......
    <graphics type='spice' autoport='yes'      <image
compression='auto_glz'/>
      <jpeg compression='auto'/>
      <zlib compression='auto'/>
      <playback compression='on'/>
/>
......
> just before adding any compression selecting elements.
> ---
>  src/conf/domain_conf.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 3f2fb11..2800db5 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -8082,6 +8082,12 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
>                                virDomainGraphicsSpiceChannelNameTypeToString(i),
>                                virDomainGraphicsSpiceChannelModeTypeToString(mode));
>          }
> +        if (!children && (def->data.spice.image || def->data.spice.jpeg ||
> +                          def->data.spice.zlib || def->data.spice.playback ||
> +                          def->data.spice.streaming)) {
> +            virBufferAddLit(buf, ">\n");
> +            children = 1;
> +        }
>          if (def->data.spice.image)
>              virBufferAsprintf(buf, "      <image compression='%s'/>\n",
>                                virDomainGraphicsSpiceImageCompressionTypeToString(def->data.spice.image));

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]