aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/proxy.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2005-12-16 18:58:00 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2005-12-16 18:58:00 +0100
commit701acdd41542656493d753a75480bc0594ea74b9 (patch)
tree6c744a64385511df327f9fa8c3081d81d18b4770 /protocols/proxy.c
parentc4168f4cfe553d111941ee385a94facb5449652d (diff)
Non-blocking SSL handshakes for GnuTLS. The rest might come later, but is
slightly less important.
Diffstat (limited to 'protocols/proxy.c')
-rw-r--r--protocols/proxy.c14
1 files changed, 4 insertions, 10 deletions
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 */