Mercurial > pidgin
diff src/html.c @ 253:5b28ef2b550e
[gaim-migrate @ 263]
A few things happened in this update:
- Commented out the libfaim deny/permit list stuff because it's seriously buggy
- Added Socks v4 support
- improved proxy support for things like getting users' info
- i think that's it
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 23 May 2000 05:26:30 +0000 |
parents | c8854c4b66cc |
children | f8a29745247c |
line wrap: on
line diff
--- a/src/html.c Mon May 22 23:58:03 2000 +0000 +++ b/src/html.c Tue May 23 05:26:30 2000 +0000 @@ -102,8 +102,7 @@ int sock; int len; int datalen = 0; - struct hostent *host; - struct sockaddr_in site; + struct in_addr *host; char buf[256]; char data; FILE *sockfile; @@ -112,17 +111,16 @@ website = parse_url(url); + /* host = gethostbyname(website.address); if (!host) { return g_strdup("g001: Error resolving host\n"); } - site.sin_family = AF_INET; - site.sin_addr.s_addr = *(long *)(host->h_addr); - site.sin_port = htons(website.port); - - sock = socket(AF_INET, SOCK_STREAM, 0); - if (sock < 0) { return g_strdup("g002: Socket Error\n"); } - - if (connect(sock, (struct sockaddr *)&site, sizeof(site))) + if ((sock = connect_address(inet_addr(host->h_addr), website.port)) <= -1) + return g_strdup("g003: Error opening connection.\n"); + */ + host = (struct in_addr *)get_address(website.address); + if (!host) { return g_strdup("g001: Error resolving host\n"); } + if ((sock = connect_address(host->s_addr, website.port)) < 0) return g_strdup("g003: Error opening connection.\n"); sockfile = fdopen(sock, "r+");