[evolution-data-server] Use the SOCKS proxy in the nntp store
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Use the SOCKS proxy in the nntp store
- Date: Wed, 2 Jun 2010 22:49:53 +0000 (UTC)
commit 2b1951811e5a83631a0da897cdd14ab05a74dc4b
Author: Federico Mena Quintero <federico novell com>
Date: Thu May 13 14:47:20 2010 -0500
Use the SOCKS proxy in the nntp store
Signed-off-by: Federico Mena Quintero <federico novell com>
camel/providers/nntp/camel-nntp-store.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index 7ba0923..cc9dbd4 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -209,6 +209,9 @@ connect_to_server (CamelService *service, struct addrinfo *ai, gint ssl_mode, Ca
{
CamelNNTPStore *store = (CamelNNTPStore *) service;
CamelDiscoStore *disco_store = (CamelDiscoStore*) service;
+ CamelSession *session;
+ char *socks_host;
+ int socks_port;
CamelStream *tcp_stream;
gboolean retval = FALSE;
guchar *buf;
@@ -235,6 +238,14 @@ connect_to_server (CamelService *service, struct addrinfo *ai, gint ssl_mode, Ca
tcp_stream = camel_tcp_stream_raw_new ();
}
+ session = camel_service_get_session (service);
+ camel_session_get_socks_proxy (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);
+ }
+
if (camel_tcp_stream_connect ((CamelTcpStream *) tcp_stream, ai) == -1) {
if (errno == EINTR)
camel_exception_set (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]