comparison src/dialogs.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 f6e8ea29b24f
children be4ac6d5c1b4
comparison
equal deleted inserted replaced
252:4a41f8323022 253:5b28ef2b550e
160 160
161 static int g_sendemail(char *name, char *email, int uname, int sname, char *country) 161 static int g_sendemail(char *name, char *email, int uname, int sname, char *country)
162 { 162 {
163 static char email_data[2000]; 163 static char email_data[2000];
164 int sock; 164 int sock;
165 struct hostent *host; 165 struct in_addr *host;
166 struct sockaddr_in site;
167 /* char data[3]; */ 166 /* char data[3]; */
168 FILE *sockfile; 167 FILE *sockfile;
169 char uname_output; 168 char uname_output;
170 FILE *tmpfile; 169 FILE *tmpfile;
171 char filename[128]; 170 char filename[128];
187 { 186 {
188 g_snprintf(buf, sizeof(buf), "uname -a > %s", filename); 187 g_snprintf(buf, sizeof(buf), "uname -a > %s", filename);
189 system(buf); 188 system(buf);
190 } 189 }
191 190
192 host = gethostbyname(REG_SRVR); 191 host = (struct in_addr *)get_address(REG_SRVR);
193 if (!host) 192 if (!host)
194 { 193 {
195 printf("Error Resolving Mail Server.\n"); 194 printf("Error Resolving Mail Server.\n");
196 return -1; 195 return -1;
197 } 196 }
198 197
199 site.sin_family = AF_INET; 198 if ((sock = connect_address(host->s_addr, REG_PORT)) < 0)
200 site.sin_addr.s_addr = *(long *)(host->h_addr);
201 site.sin_port = htons(REG_PORT);
202
203 sock = socket(AF_INET, SOCK_STREAM, 0);
204 if (sock < 0)
205 {
206 printf("Socket Error.\n");
207 return -1;
208 }
209
210 if (connect(sock, (struct sockaddr *)&site, sizeof(site)))
211 { 199 {
212 printf("Error Connecting to Socket.\n"); 200 printf("Error Connecting to Socket.\n");
213 return -1; 201 return -1;
214 } 202 }
215 203