[PATCH spice-html5] When offered multiple heads, generate a warning, rather than failing in subtle ways.

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

 



Signed-off-by: Jeremy White <jwhite@xxxxxxxxxxxxxxx>
---
 main.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/main.js b/main.js
index 2d8a1ff..173ff97 100644
--- a/main.js
+++ b/main.js
@@ -145,7 +145,12 @@ SpiceMainConn.prototype.process_channel_message = function(msg)
                         chan_id : chans.channels[i].id
                     };
             if (chans.channels[i].type == SPICE_CHANNEL_DISPLAY)
-                this.display = new SpiceDisplayConn(conn);
+            {
+                if (this.display !== undefined)
+                    this.log_warn("The spice-html5 client does not handle multiple heads.");
+                else
+                    this.display = new SpiceDisplayConn(conn);
+            }
             else if (chans.channels[i].type == SPICE_CHANNEL_INPUTS)
             {
                 this.inputs = new SpiceInputsConn(conn);
-- 
2.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]