[PATCH spice-gtk] session: copy proxy setting

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

 



Solve migration falling back to switch-host method when using proxy
set through controller:

https://bugzilla.redhat.com/show_bug.cgi?id=923894
---
 gtk/spice-session.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index 6fa8699..ec9cba1 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1179,13 +1179,17 @@ SpiceSession *spice_session_new_from_session(SpiceSession *session)
                                                     NULL));
     SpiceSessionPrivate *c = copy->priv, *s = session->priv;
 
-    g_warn_if_fail (c->host == NULL);
-    g_warn_if_fail (c->tls_port == NULL);
-    g_warn_if_fail (c->password == NULL);
-    g_warn_if_fail (c->ca_file == NULL);
-    g_warn_if_fail (c->ciphers == NULL);
-    g_warn_if_fail (c->cert_subject == NULL);
-    g_warn_if_fail (c->pubkey == NULL);
+    g_clear_object(&c->proxy);
+
+    g_warn_if_fail(c->host == NULL);
+    g_warn_if_fail(c->tls_port == NULL);
+    g_warn_if_fail(c->password == NULL);
+    g_warn_if_fail(c->ca_file == NULL);
+    g_warn_if_fail(c->ciphers == NULL);
+    g_warn_if_fail(c->cert_subject == NULL);
+    g_warn_if_fail(c->pubkey == NULL);
+    g_warn_if_fail(c->pubkey == NULL);
+    g_warn_if_fail(c->proxy == NULL);
 
     g_object_get(session,
                  "host", &c->host,
@@ -1201,6 +1205,7 @@ SpiceSession *spice_session_new_from_session(SpiceSession *session)
                  "enable-smartcard", &c->smartcard,
                  "enable-audio", &c->audio,
                  "enable-usbredir", &c->usbredir,
+                 "proxy", &c->proxy,
                  NULL);
 
     c->client_provided_sockets = s->client_provided_sockets;
-- 
1.8.1.1.439.g50a6b54

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]