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

Michael Ellerman michael at ellerman.id.au
Tue Mar 4 22:05:45 EST 2008


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();
 		}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://pidgin.im/pipermail/devel/attachments/20080305/4bbfcd14/attachment.sig>


More information about the Devel mailing list