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

Michael Ellerman michael at ellerman.id.au
Tue Mar 4 23:48:55 EST 2008

On Tue, 2008-03-04 at 20:22 -0800, Jeff Connelly wrote:
> 2008/3/4 Michael Ellerman <michael at ellerman.id.au>:
> > 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.

> For what it is worth, I've used g_str_equal() instead of strcmp()
> throughout the MySpaceIM protocol plugin to avoid this particular
> mistake.
> g_str_equal() was intended to be used with glib to compare strings
> within hash tables, but it works pretty well as a general-purpose
> function, and has saner return values.

Yeah, strcmp() sucks. People get it wrong all the time. I didn't know
about g_str_equal() - if the Pidgin cabal prefer that it would be a good
change IMHO.


ps. apologies if the patch is word-wrapped, I think I forgot to turn off

-------------- 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/3580fdf2/attachment.sig>

More information about the Devel mailing list