From d259a738dff84880b7d9b9cd51cc90af8803033c Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 1 Jun 2010 14:30:32 -0500 Subject: [PATCH] Fix thinko when processing the reply from the SOCKS4 proxy Signed-off-by: Federico Mena Quintero --- 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 */ -- 2.7.4