[gnome-boxes] spice: Allow to set a SPICE TLS port



commit f558eabb00fa0f3e5b60cb5a383a2473122bcf2c
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Fri Jul 20 23:46:51 2012 +0200

    spice: Allow to set a SPICE TLS port
    
    The SpiceDisplay class did not support TLS ports, but oVirt uses
    TLS connections to VMs most of the time so SpiceDisplay needs to
    be extended to cope with this..
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681747

 src/spice-display.vala |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/spice-display.vala b/src/spice-display.vala
index a5d9bd7..ad55b8e 100644
--- a/src/spice-display.vala
+++ b/src/spice-display.vala
@@ -80,11 +80,16 @@ private class Boxes.SpiceDisplay: Boxes.Display {
         main_cleanup ();
     }
 
-    public SpiceDisplay (BoxConfig config, string host, int port) {
+    public SpiceDisplay (BoxConfig config, string host, int port, int tls_port = 0)
+        requires (port != 0 || tls_port != 0) {
         this.config = config;
 
-        session.port = port.to_string ();
         session.host = host;
+        if (port != 0)
+            session.port = port.to_string ();
+
+        if (tls_port != 0)
+            session.tls_port = tls_port.to_string ();
     }
 
     public SpiceDisplay.with_uri (BoxConfig config, string uri) {



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