Hi On Tue, Jan 29, 2013 at 6:09 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote: > On Tue, Jan 29, 2013 at 06:01:34PM +0100, Marc-André Lureau wrote: >> On Tue, Jan 29, 2013 at 5:54 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote: >> > update_proxy(session, NULL); will never unset an already set proxy. >> >> >> If SPICE_PROXY is set, it will replace it if it's a valid value. >> >> If SPICE_PROXY is not set, it won't replace it, keep current proxy. Is >> that a problem? > > I think so, > g_object_set (session, "proxy", "http://example.com:8000", NULL); > g_object_set (session, "proxy", NULL, NULL); > will not do what is expected (unset the proxy), will it? > So in short, you would want to clear, if both str argument is NULL and SPICE_PROXY is NULL: if (str == NULL) str = g_getenv("SPICE_PROXY"); - if (str == NULL || *str == 0) + if (str == NULL || *str == 0) { + g_clear_object(&s->proxy); return; + } -- Marc-André Lureau _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel