[evolution-data-server/camel-socks-proxy] bmc#3667 - SOCKS5 failure doesn't fall back to SOCKS4



commit 1e1b978b172d6efbb0ac9e41eb7c4e1e17a47396
Author: Federico Mena Quintero <federico novell com>
Date:   Tue Sep 14 15:05: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 |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index 4e3711a..c273c1d 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -855,6 +855,7 @@ socks5_initiate_and_request_authentication (CamelTcpStreamRaw *raw, PRFileDesc *
 	d (g_print ("  reading SOCKS5 reply\n"));
 	if (read_from_prfd (fd, reply, sizeof (reply)) != sizeof (reply)) {
 		d (g_print ("  failed: %d\n", errno));
+		camel_exception_set (ex, CAMEL_EXCEPTION_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]