Mercurial > pidgin
comparison src/proxy.c @ 10626:06f5cc17cddc
[gaim-migrate @ 12101]
Revert the change to use the g_thread based asynchronous DNS lookup. Use getaddrinfo on Win32.
committer: Tailor Script <tailor@pidgin.im>
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Wed, 23 Feb 2005 02:35:51 +0000 |
| parents | 4ab7dec04c38 |
| children | 72a5babfa8b4 |
comparison
equal
deleted
inserted
replaced
| 10625:9eb235c6dc0a | 10626:06f5cc17cddc |
|---|---|
| 187 * Proxy API | 187 * Proxy API |
| 188 **************************************************************************/ | 188 **************************************************************************/ |
| 189 typedef void (*dns_callback_t)(GSList *hosts, gpointer data, | 189 typedef void (*dns_callback_t)(GSList *hosts, gpointer data, |
| 190 const char *error_message); | 190 const char *error_message); |
| 191 | 191 |
| 192 #if 0 | 192 #ifdef __unix__ |
| 193 | 193 |
| 194 /* This structure represents both a pending DNS request and | 194 /* This structure represents both a pending DNS request and |
| 195 * a free child process. | 195 * a free child process. |
| 196 */ | 196 */ |
| 197 typedef struct { | 197 typedef struct { |
| 632 req->inpa = gaim_input_add(req->fd_out, GAIM_INPUT_READ, host_resolved, req); | 632 req->inpa = gaim_input_add(req->fd_out, GAIM_INPUT_READ, host_resolved, req); |
| 633 | 633 |
| 634 return 0; | 634 return 0; |
| 635 } | 635 } |
| 636 | 636 |
| 637 #elif defined G_THREADS_ENABLED | 637 #elif defined _WIN32 /* end __unix__ */ |
| 638 | 638 |
| 639 typedef struct _dns_tdata { | 639 typedef struct _dns_tdata { |
| 640 char *hostname; | 640 char *hostname; |
| 641 int port; | 641 int port; |
| 642 dns_callback_t callback; | 642 dns_callback_t callback; |
| 744 return -1; | 744 return -1; |
| 745 } | 745 } |
| 746 return 0; | 746 return 0; |
| 747 } | 747 } |
| 748 | 748 |
| 749 #else /* not G_THREADS_ENABLED */ | 749 #else /* not __unix__ or _WIN32 */ |
| 750 | 750 |
| 751 typedef struct { | 751 typedef struct { |
| 752 gpointer data; | 752 gpointer data; |
| 753 size_t addrlen; | 753 size_t addrlen; |
| 754 struct sockaddr *addr; | 754 struct sockaddr *addr; |
| 1918 proxy_pref_cb, NULL); | 1918 proxy_pref_cb, NULL); |
| 1919 gaim_prefs_connect_callback(handle, "/core/proxy/username", | 1919 gaim_prefs_connect_callback(handle, "/core/proxy/username", |
| 1920 proxy_pref_cb, NULL); | 1920 proxy_pref_cb, NULL); |
| 1921 gaim_prefs_connect_callback(handle, "/core/proxy/password", | 1921 gaim_prefs_connect_callback(handle, "/core/proxy/password", |
| 1922 proxy_pref_cb, NULL); | 1922 proxy_pref_cb, NULL); |
| 1923 #ifdef _WIN32 | |
| 1923 if(!g_thread_supported()) | 1924 if(!g_thread_supported()) |
| 1924 g_thread_init(NULL); | 1925 g_thread_init(NULL); |
| 1926 #endif | |
| 1925 } | 1927 } |
| 1926 | 1928 |
| 1927 void * | 1929 void * |
| 1928 gaim_proxy_get_handle() | 1930 gaim_proxy_get_handle() |
| 1929 { | 1931 { |
