From 701acdd41542656493d753a75480bc0594ea74b9 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 16 Dec 2005 18:58:00 +0100 Subject: Non-blocking SSL handshakes for GnuTLS. The rest might come later, but is slightly less important. --- protocols/proxy.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'protocols/proxy.c') diff --git a/protocols/proxy.c b/protocols/proxy.c index 0546f2d7..c658a163 100644 --- a/protocols/proxy.c +++ b/protocols/proxy.c @@ -132,8 +132,8 @@ static void gaim_io_connected(gpointer data, gint source, GaimInputCondition con } return; } - fcntl(source, F_SETFL, 0); #endif + sock_make_blocking(source); gaim_input_remove(phb->inpa); if( phb->proxy_func ) phb->proxy_func(phb->proxy_data, source, GAIM_INPUT_READ); @@ -228,9 +228,7 @@ static void http_canwrite(gpointer data, gint source, GaimInputCondition cond) g_free(phb); return; } -#ifdef F_SETFL - fcntl(source, F_SETFL, 0); -#endif + sock_make_blocking(source); g_snprintf(cmd, sizeof(cmd), "CONNECT %s:%d HTTP/1.1\r\nHost: %s:%d\r\n", phb->host, phb->port, phb->host, phb->port); @@ -321,9 +319,7 @@ static void s4_canwrite(gpointer data, gint source, GaimInputCondition cond) g_free(phb); return; } -#ifdef F_SETFL - fcntl(source, F_SETFL, 0); -#endif + sock_make_blocking(source); /* XXX does socks4 not support host name lookups by the proxy? */ if (!(hp = gethostbyname(phb->host))) { @@ -508,9 +504,7 @@ static void s5_canwrite(gpointer data, gint source, GaimInputCondition cond) g_free(phb); return; } -#ifdef F_SETFL - fcntl(source, F_SETFL, 0); -#endif + sock_make_blocking(source); i = 0; buf[0] = 0x05; /* SOCKS version 5 */ -- cgit v1.2.3