[evolution-data-server/camel-socks-proxy-master] bmc#3667 - SOCKS5	failure doesn't fall back to SOCKS4
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [evolution-data-server/camel-socks-proxy-master] bmc#3667 - SOCKS5	failure doesn't fall back to SOCKS4
- Date: Tue, 14 Sep 2010 20:10:01 +0000 (UTC)
commit 00af4564a58e672d34765f011cab592876d5951f
Author: Federico Mena Quintero <federico novell com>
Date:   Tue Sep 14 15:19:34 2010 -0500
    bmc#3667 - SOCKS5 failure doesn't fall back to SOCKS4
    
    We fall back to SOCKS4 if the SOCKS5 process returns an exception of
    CAMEL_EXCEPTION_PROXY_NOT_SUPPORTED, but we were not doing that if
    the initial reply from the SOCKS server is not of the expected length.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>
 camel/camel-tcp-stream-raw.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index a754692..f895404 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -796,6 +796,8 @@ socks5_initiate_and_request_authentication (CamelTcpStreamRaw *raw, PRFileDesc *
 	d (g_print ("  reading SOCKS5 reply\n"));
 	if (read_from_prfd (fd, reply, sizeof (reply), error) != sizeof (reply)) {
 		d (g_print ("  failed: %d\n", errno));
+		g_set_error (error, CAMEL_PROXY_ERROR, CAMEL_PROXY_ERROR_PROXY_NOT_SUPPORTED,
+			     _("The proxy host does not support SOCKS5"));
 		return FALSE;
 	}
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]