Mercurial > pidgin.yaz
changeset 13312:ce9f249e897b
[gaim-migrate @ 15678]
The HTTP proxy code shouldn't assume that it is being used by an account. This should fix some crashing that was happening for proxy errors.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 22 Feb 2006 00:40:43 +0000 |
parents | f6f465b8d1c0 |
children | 403a97caf5c0 |
files | src/proxy.c |
diffstat | 1 files changed, 20 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/proxy.c Tue Feb 21 19:56:50 2006 +0000 +++ b/src/proxy.c Wed Feb 22 00:40:43 2006 +0000 @@ -1212,7 +1212,10 @@ char *msg = g_strdup_printf(_("Proxy connection error %d"), status); close(source); source = -1; - gaim_connection_error(phb->account->gc, msg); + if(phb->account) + gaim_connection_error(phb->account->gc, msg); + else + gaim_debug_error("http proxy", "%s\n", msg); g_free(msg); gaim_input_remove(phb->inpa); g_free(phb->read_buffer); @@ -1265,7 +1268,10 @@ char *msg = g_strdup_printf(_("Proxy connection error %d"), status); close(source); source = -1; - gaim_connection_error(phb->account->gc, msg); + if(phb->account) + gaim_connection_error(phb->account->gc, msg); + else + gaim_debug_error("http proxy", "%s\n", msg); g_free(msg); gaim_input_remove(phb->inpa); g_free(phb->read_buffer); @@ -1311,7 +1317,10 @@ char *msg = g_strdup_printf(_("Proxy connection error %d"), status); close(source); source = -1; - gaim_connection_error(phb->account->gc, msg); + if(phb->account) + gaim_connection_error(phb->account->gc, msg); + else + gaim_debug_error("http proxy", "%s\n", msg); g_free(msg); gaim_input_remove(phb->inpa); g_free(phb->read_buffer); @@ -1322,7 +1331,10 @@ } if(status == 403 /* Forbidden */ ) { gchar *msg = g_strdup_printf(_("Access denied: proxy server forbids port %d tunnelling."), phb->port); - gaim_connection_error(phb->account->gc, msg); + if(phb->account) + gaim_connection_error(phb->account->gc, msg); + else + gaim_debug_error("http proxy", "%s\n", msg); g_free(msg); gaim_input_remove(phb->inpa); g_free(phb->read_buffer); @@ -1330,7 +1342,10 @@ g_free(phb); } else { char *msg = g_strdup_printf(_("Proxy connection error %d"), status); - gaim_connection_error(phb->account->gc, msg); + if(phb->account) + gaim_connection_error(phb->account->gc, msg); + else + gaim_debug_error("http proxy", "%s\n", msg); g_free(msg); gaim_input_remove(phb->inpa); g_free(phb->read_buffer);