src/proxy.c

changeset 14245
8a215625c6cb
parent 14243
0bda01972ff2
equal deleted inserted replaced
14244:6ad49280546a 14245:8a215625c6cb
45 char *host; 45 char *host;
46 int port; 46 int port;
47 int fd; 47 int fd;
48 guint inpa; 48 guint inpa;
49 GaimProxyInfo *gpi; 49 GaimProxyInfo *gpi;
50 GaimDnsQueryData *query_data;
50 51
51 /** 52 /**
52 * This contains alternating length/char* values. The char* 53 * This contains alternating length/char* values. The char*
53 * values need to be freed when removed from the linked list. 54 * values need to be freed when removed from the linked list.
54 */ 55 */
1693 default: 1694 default:
1694 gaim_proxy_connect_info_destroy(connect_info); 1695 gaim_proxy_connect_info_destroy(connect_info);
1695 return NULL; 1696 return NULL;
1696 } 1697 }
1697 1698
1698 if (gaim_gethostbyname_async(connecthost, 1699 connect_info->query_data = gaim_dnsquery_a(connecthost,
1699 connectport, connection_host_resolved, connect_info) != 0) 1700 connectport, connection_host_resolved, connect_info);
1701 if (connect_info->query_data == NULL)
1700 { 1702 {
1701 gaim_proxy_connect_info_destroy(connect_info); 1703 gaim_proxy_connect_info_destroy(connect_info);
1702 return NULL; 1704 return NULL;
1703 } 1705 }
1704 1706
1726 connect_info->data = data; 1728 connect_info->data = data;
1727 connect_info->host = g_strdup(host); 1729 connect_info->host = g_strdup(host);
1728 connect_info->port = port; 1730 connect_info->port = port;
1729 connect_info->gpi = gpi; 1731 connect_info->gpi = gpi;
1730 1732
1731 if (gaim_gethostbyname_async(gaim_proxy_info_get_host(gpi), 1733 connect_info->query_data =
1732 gaim_proxy_info_get_port(gpi), connection_host_resolved, connect_info) != 0) 1734 gaim_dnsquery_a(gaim_proxy_info_get_host(gpi),
1735 gaim_proxy_info_get_port(gpi),
1736 connection_host_resolved, connect_info);
1737 if (connect_info->query_data == NULL)
1733 { 1738 {
1734 gaim_proxy_connect_info_destroy(connect_info); 1739 gaim_proxy_connect_info_destroy(connect_info);
1735 return NULL; 1740 return NULL;
1736 } 1741 }
1737 1742

mercurial