Mercurial > pidgin
comparison libpurple/protocols/yahoo/util.c @ 30182:984217629ec9
Make HTTP proxy detection in the yahoo prpls a bit more robust. This should
solve some weird proxy related items I couldn't figure out before. Refs #11986.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Mon, 14 Jun 2010 00:05:55 +0000 |
parents | d1cecbc467c6 |
children | 64cb8836133e |
comparison
equal
deleted
inserted
replaced
30181:e9001aa49be8 | 30182:984217629ec9 |
---|---|
31 #include "libymsg.h" | 31 #include "libymsg.h" |
32 | 32 |
33 #include <string.h> | 33 #include <string.h> |
34 | 34 |
35 gboolean | 35 gboolean |
36 yahoo_account_use_http_proxy(PurpleConnection *conn) | 36 yahoo_account_use_http_proxy(PurpleConnection *pc) |
37 { | 37 { |
38 PurpleProxyInfo *ppi = purple_proxy_get_setup(conn->account); | 38 PurpleAccount *account = purple_connection_get_account(pc); |
39 return (ppi->type == PURPLE_PROXY_HTTP || ppi->type == PURPLE_PROXY_USE_ENVVAR); | 39 PurpleProxyInfo *ppi = NULL; |
40 PurpleProxyType type = PURPLE_PROXY_NONE; | |
41 gboolean proxy_ssl = purple_account_get_bool(account, "proxy_ssl", FALSE); | |
42 | |
43 if(proxy_ssl) | |
44 ppi = purple_proxy_get_setup(account); | |
45 else | |
46 ppi = purple_global_proxy_get_info(); | |
47 | |
48 type = purple_proxy_info_get_type(ppi); | |
49 | |
50 return (type == PURPLE_PROXY_HTTP || type == PURPLE_PROXY_USE_ENVVAR); | |
40 } | 51 } |
41 | 52 |
42 /* | 53 /* |
43 * Returns cookies formatted as a null terminated string for the given connection. | 54 * Returns cookies formatted as a null terminated string for the given connection. |
44 * Must g_free return value. | 55 * Must g_free return value. |