GSocketClient: fix handling of application proxies
authorDan Winship <danw@gnome.org>
Tue, 9 Dec 2014 12:35:06 +0000 (13:35 +0100)
committerDan Winship <danw@gnome.org>
Fri, 6 Mar 2015 21:01:07 +0000 (16:01 -0500)
commit6ce79e586f0bb5df49e8f1a1935bfef666986f8a
tree7d1d0d4a549d1aaafaba8d8bf82a3225918eb5ad
parented4a742946374f7ee3c46b93eb943c95f04ec4c4
GSocketClient: fix handling of application proxies

g_socket_client_add_application_proxy() claimed "When the indicated
proxy protocol is returned by the #GProxyResolver, #GSocketClient will
consider this protocol as supported but will not try to find a #GProxy
instance to handle handshaking." But in fact, it did the checks in the
wrong order, so GProxy proxies ended up overriding
application-specified ones. Fix that.

Also, simplify the code a bit by making use of g_hash_table_add() and
g_hash_table_contains().

https://bugzilla.gnome.org/show_bug.cgi?id=733876
gio/gsocketclient.c