[evolution-data-server] Use the SOCKS proxy in the imapx server



commit b663dad5c80d6611d11d2e095c1e84721d853be7
Author: Federico Mena Quintero <federico novell com>
Date:   Thu May 13 14:46:18 2010 -0500

    Use the SOCKS proxy in the imapx server
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 camel/providers/imapx/camel-imapx-server.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 811f8e0..c81c17d 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -2122,6 +2122,8 @@ gboolean
 imapx_connect_to_server (CamelIMAPXServer *is, CamelException *ex)
 {
 	CamelStream * tcp_stream = NULL;
+	char *socks_host;
+	int socks_port;
 	CamelSockOptData sockopt;
 	gint ret, ssl_mode = 0;
 
@@ -2165,6 +2167,13 @@ imapx_connect_to_server (CamelIMAPXServer *is, CamelException *ex)
 	is->is_ssl_stream = FALSE;
 #endif /* HAVE_SSL */
 
+	camel_session_get_socks_proxy (is->session, &socks_host, &socks_port);
+
+	if (socks_host) {
+		camel_tcp_stream_set_socks_proxy ((CamelTcpStream *) tcp_stream, socks_host, socks_port);
+		g_free (socks_host);
+	}
+
 	hints.ai_socktype = SOCK_STREAM;
 	ai = camel_getaddrinfo(is->url->host, serv, &hints, ex);
 	if (ex && ex->id && ex->id != CAMEL_EXCEPTION_USER_CANCEL && port != NULL) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]