fix spice graphic format issue in function virDomainGraphicsDefFormat

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

 



hi,
all sub item of spice graphics need to processed like spice channels, that is adding the following lines:
Âif (!children) {
  virBufferAddLit(buf, ">\n");
  children = 1;
}

the following patch is generated base on git master.
-----------------------------------------------------------------------------------------
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b30acc8..e42db06 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8127,21 +8127,46 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
               ÂvirDomainGraphicsSpiceChannelNameTypeToString(i),
               ÂvirDomainGraphicsSpiceChannelModeTypeToString(mode));
    Â}
- Â Â Â Âif (def->data.spice.image)
+ Â Â Â Âif (def->data.spice.image) {
      ÂvirBufferAsprintf(buf, "   Â<image compression='%s'/>\n",
               ÂvirDomainGraphicsSpiceImageCompressionTypeToString(def->data.spice.image));
- Â Â Â Âif (def->data.spice.jpeg)
+ Â Â Â Â Â Âif (!children) {
+ Â Â Â Â Â Â Â ÂvirBufferAddLit(buf, ">\n");
+ Â Â Â Â Â Â Â Âchildren = 1;
+ Â Â Â Â Â Â}
+ Â Â Â Â}
+ Â Â Â Âif (def->data.spice.jpeg) {
      ÂvirBufferAsprintf(buf, "   Â<jpeg compression='%s'/>\n",
               ÂvirDomainGraphicsSpiceJpegCompressionTypeToString(def->data.spice.jpeg));
- Â Â Â Âif (def->data.spice.zlib)
+ Â Â Â Â Â Âif (!children) {
+ Â Â Â Â Â Â Â ÂvirBufferAddLit(buf, ">\n");
+ Â Â Â Â Â Â Â Âchildren = 1;
+ Â Â Â Â Â Â}
+ Â Â Â Â}
+ Â Â Â Âif (def->data.spice.zlib) {
      ÂvirBufferAsprintf(buf, "   Â<zlib compression='%s'/>\n",
               ÂvirDomainGraphicsSpiceZlibCompressionTypeToString(def->data.spice.zlib));
- Â Â Â Âif (def->data.spice.playback)
+ Â Â Â Â Â Âif (!children) {
+ Â Â Â Â Â Â Â ÂvirBufferAddLit(buf, ">\n");
+ Â Â Â Â Â Â Â Âchildren = 1;
+ Â Â Â Â Â Â}
+ Â Â Â Â}
+ Â Â Â Âif (def->data.spice.playback) {
      ÂvirBufferAsprintf(buf, "   Â<playback compression='%s'/>\n",
               ÂvirDomainGraphicsSpicePlaybackCompressionTypeToString(def->data.spice.playback));
- Â Â Â Âif (def->data.spice.streaming)
+ Â Â Â Â Â Âif (!children) {
+ Â Â Â Â Â Â Â ÂvirBufferAddLit(buf, ">\n");
+ Â Â Â Â Â Â Â Âchildren = 1;
+ Â Â Â Â Â Â}
+ Â Â Â Â}
+ Â Â Â Âif (def->data.spice.streaming) {
      ÂvirBufferAsprintf(buf, "   Â<streaming mode='%s'/>\n",
               ÂvirDomainGraphicsSpiceStreamingModeTypeToString(def->data.spice.streaming));
+ Â Â Â Â Â Âif (!children) {
+ Â Â Â Â Â Â Â ÂvirBufferAddLit(buf, ">\n");
+ Â Â Â Â Â Â Â Âchildren = 1;
+ Â Â Â Â Â Â}
+ Â Â Â Â}
  Â}
Â
  Âif (children) {


--
Coolper Chen
--
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]