[Spice-devel] [PATCH spice-gtk] session: copy proxy setting
Christophe Fergeau
cfergeau at redhat.com
Tue Mar 26 02:18:24 PDT 2013
On Mon, Mar 25, 2013 at 04:07:55PM +0100, Christophe Fergeau wrote:
> On Mon, Mar 25, 2013 at 03:44:20PM +0100, Marc-André Lureau wrote:
> > 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,
>
> Shouldn't this be c->proxy?
Scratch that, this is a g_object_get, so the & is needed. For some reason I
wanted that call to be a g_object_set. Apologies for the noise, ACK
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130326/9d7e3f53/attachment.pgp>
More information about the Spice-devel
mailing list