Mercurial > pidgin
comparison libpurple/proxy.c @ 20359:36da9249f3a9
applied changes from e33c17e58da161b8cffaf13e9d79e9bb4b9ce4ce
through e2f6be4e0c0daee25fdb3250a7e16a881922f8c4
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 21 Oct 2007 05:02:09 +0000 |
parents | 04fe5601fedb |
children | 787b3897ba9f |
comparison
equal
deleted
inserted
replaced
20358:39a7c295c63c | 20359:36da9249f3a9 |
---|---|
688 { | 688 { |
689 /* Check for Type-2 */ | 689 /* Check for Type-2 */ |
690 gchar *tmp = ntlm; | 690 gchar *tmp = ntlm; |
691 guint8 *nonce; | 691 guint8 *nonce; |
692 gchar *domain = (gchar*)purple_proxy_info_get_username(connect_data->gpi); | 692 gchar *domain = (gchar*)purple_proxy_info_get_username(connect_data->gpi); |
693 gchar *username; | 693 gchar *username = NULL; |
694 gchar *request; | 694 gchar *request; |
695 gchar *response; | 695 gchar *response; |
696 | 696 |
697 username = strchr(domain, '\\'); | 697 if (domain != NULL) |
698 username = strchr(domain, '\\'); | |
698 if (username == NULL) | 699 if (username == NULL) |
699 { | 700 { |
700 purple_proxy_connect_data_disconnect_formatted(connect_data, | 701 purple_proxy_connect_data_disconnect_formatted(connect_data, |
701 _("HTTP proxy connection error %d"), status); | 702 _("HTTP proxy connection error %d"), status); |
702 return; | 703 return; |
736 proxy_do_write(connect_data, connect_data->fd, cond); | 737 proxy_do_write(connect_data, connect_data->fd, cond); |
737 return; | 738 return; |
738 } else if((ntlm = g_strrstr((const char *)connect_data->read_buffer, "Proxy-Authenticate: NTLM"))) { /* Empty message */ | 739 } else if((ntlm = g_strrstr((const char *)connect_data->read_buffer, "Proxy-Authenticate: NTLM"))) { /* Empty message */ |
739 gchar request[2048]; | 740 gchar request[2048]; |
740 gchar *domain = (gchar*) purple_proxy_info_get_username(connect_data->gpi); | 741 gchar *domain = (gchar*) purple_proxy_info_get_username(connect_data->gpi); |
741 gchar *username; | 742 gchar *username = NULL; |
742 int request_len; | 743 int request_len; |
743 username = strchr(domain, '\\'); | 744 |
745 if (domain != NULL) | |
746 username = strchr(domain, '\\'); | |
744 if (username == NULL) | 747 if (username == NULL) |
745 { | 748 { |
746 purple_proxy_connect_data_disconnect_formatted(connect_data, | 749 purple_proxy_connect_data_disconnect_formatted(connect_data, |
747 _("HTTP proxy connection error %d"), status); | 750 _("HTTP proxy connection error %d"), status); |
748 return; | 751 return; |