[PATCH] Fix bug in "manual" GNOME proxy handling

Mark Doliner mark at kingant.net
Wed Mar 5 04:32:30 EST 2008


On Wed, 05 Mar 2008 14:05:45 +1100, Michael Ellerman wrote
> In libpurple/proxy.c, purple_gnome_proxy_get_info() uses gconftool to
> get the GNOME proxy settings. It explicitly looks for proxy type =
> "none", in which case no proxy is used, and also proxy type = 
> "manual" in which case the global pidgin proxy is used.
> 
> However the check for "manual" is missing a ! on the strcmp(), so it
> incorrectly falls through. The following code assumes it's using a HTTP
> proxy, which may not be the case when "manual" is specified. This causes
> pidgin to pop up a warning about the proxy host/port being invalid.
> 
> Index: pidgin-2.2.1/libpurple/proxy.c
> ===================================================================
> --- pidgin-2.2.1.orig/libpurple/proxy.c
> +++ pidgin-2.2.1/libpurple/proxy.c
> @@ -225,7 +225,7 @@ purple_gnome_proxy_get_info(void)
>  			info.type = PURPLE_PROXY_NONE;
>  			g_free(tmp);
>  			return &info;
> -		} else if (strcmp(tmp, "manual\n")) {
> +		} else if (!strcmp(tmp, "manual\n")) {
>  			g_free(tmp);
>  			return purple_global_proxy_get_info();
>  		}

I don't think this change is correct.  "manual" means that the user has
entered a proxy into their Gnome Proxy Preferences window.  This check says,
"if proxy type is anything other than manual than bail out and use the global
proxy info."

What error are you seeing, exactly?  Is your Gnome Proxy Preference set to
"manual" but you don't have an HTTP proxy hostname set?

-Mark




More information about the Devel mailing list