[evolution-data-server/camel-socks-proxy] Fix thinko when processing the reply from the SOCKS4 proxy



commit 2594d4c4fe44253d74dd70d2101ee6c15ea08e68
Author: Federico Mena Quintero <federico novell com>
Date:   Tue Jun 1 14:30:32 2010 -0500

    Fix thinko when processing the reply from the SOCKS4 proxy
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 camel/camel-tcp-stream-raw.c |    2 +-
 camel/camel-tcp-stream-ssl.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index a8b6d4b..21ae9c0 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -449,7 +449,7 @@ connect_to_socks4_proxy (const gchar *proxy_host, gint proxy_port, struct addrin
 		goto error;
 
 	if (!(reply[0] == 0		/* first byte of reply is 0 */
-	      && reply[1] != 90))	/* 90 means "request granted" */
+	      && reply[1] == 90))	/* 90 means "request granted" */
 		goto error;
 
 	goto out;
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index a7610d3..b22201e 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -1277,7 +1277,7 @@ connect_to_socks4_proxy (CamelTcpStreamSSL *ssl, const gchar *proxy_host, gint p
 		goto error;
 
 	if (!(reply[0] == 0		/* first byte of reply is 0 */
-	      && reply[1] != 90))	/* 90 means "request granted" */
+	      && reply[1] == 90))	/* 90 means "request granted" */
 		goto error;
 
 	/* We are now proxied we are ready to send "normal" data through the socket */



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