On Mon, Jan 28, 2013 at 09:19:33PM +0100, Marc-André Lureau wrote: > Add a session property to set proxy setting, since it is racy to rely > on setenv(). Also doing so would override system environment, which > will modify other session too sharing the same process. > --- > gtk/spice-proxy.c | 10 ++++++++++ > gtk/spice-proxy.h | 1 + > gtk/spice-session.c | 54 ++++++++++++++++++++++++++++++++++++++++------------- > 3 files changed, 52 insertions(+), 13 deletions(-) > > diff --git a/gtk/spice-proxy.c b/gtk/spice-proxy.c > index 97c3a6b..2182f33 100644 > --- a/gtk/spice-proxy.c > +++ b/gtk/spice-proxy.c > @@ -234,3 +234,13 @@ static void spice_proxy_class_init(SpiceProxyClass *klass) > G_PARAM_STATIC_STRINGS | > G_PARAM_READWRITE)); > } > + > +gchar* spice_proxy_to_string(SpiceProxy* self) > +{ > + SpiceProxyPrivate *p; > + > + g_return_val_if_fail(SPICE_IS_PROXY(self), NULL); > + p = self->priv; > + > + return g_strdup_printf("%s://%s:%u", p->protocol, p->hostname, p->port); Oh, forgot to ask if p->protocol and p->hostname can be NULL there, and if we need g_return_val_if_fail checks for these? Christophe
Attachment:
pgpVDpid2jK0c.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel