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



commit d259a738dff84880b7d9b9cd51cc90af8803033c
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 a7724fd..3bc1253 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -421,7 +421,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 899d26b..93bad39 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -1136,7 +1136,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]