comparison src/proxy.c @ 10307:2ac21bf20e04

[gaim-migrate @ 11497] And another one gone, and another one gone, another one bites the dust. Hopefully I'm committing everything this time. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 03 Dec 2004 02:46:34 +0000
parents 9bfcb5eb12bd
children 19974fd2d61d
comparison
equal deleted inserted replaced
10306:56cc5d49472b 10307:2ac21bf20e04
534 int gaim_gethostbyname_async(const char *hostname, int port, dns_callback_t callback, gpointer data) 534 int gaim_gethostbyname_async(const char *hostname, int port, dns_callback_t callback, gpointer data)
535 { 535 {
536 pending_dns_request_t *req = NULL; 536 pending_dns_request_t *req = NULL;
537 dns_params_t dns_params; 537 dns_params_t dns_params;
538 gchar *host_temp; 538 gchar *host_temp;
539 gboolean show_debug;
540
541 show_debug = gaim_debug_is_enabled();
539 542
540 host_temp = g_strstrip(g_strdup(hostname)); 543 host_temp = g_strstrip(g_strdup(hostname));
541 strncpy(dns_params.hostname, host_temp, sizeof(dns_params.hostname) - 1); 544 strncpy(dns_params.hostname, host_temp, sizeof(dns_params.hostname) - 1);
542 g_free(host_temp); 545 g_free(host_temp);
543 dns_params.hostname[sizeof(dns_params.hostname) - 1] = '\0'; 546 dns_params.hostname[sizeof(dns_params.hostname) - 1] = '\0';
598 if (req->dns_pid == 0) { 601 if (req->dns_pid == 0) {
599 /* We should not access the parent's side of the pipe, so close them... */ 602 /* We should not access the parent's side of the pipe, so close them... */
600 close(child_out[0]); 603 close(child_out[0]);
601 close(child_in[1]); 604 close(child_in[1]);
602 605
603 gaim_dns_childthread(child_out[1], child_in[0], &dns_params, opt_debug); 606 gaim_dns_childthread(child_out[1], child_in[0], &dns_params, show_debug);
604 /* The thread calls _exit() rather than returning, so we never get here */ 607 /* The thread calls _exit() rather than returning, so we never get here */
605 } 608 }
606 609
607 /* We should not access the child's side of the pipe, so close them... */ 610 /* We should not access the child's side of the pipe, so close them... */
608 close(child_out[1]); 611 close(child_out[1]);