tBug fix for handling of SOCKS4 CONNECT reply code - vaccinewars - be a doctor and try to vaccinate the world
git clone git://src.adamsgaard.dk/vaccinewars
Log
Files
Refs
README
LICENSE
---
commit 94c686d2f6a55c9e1aba1286e3681c3be61fb0ca
parent cae0ece3d9108923211a37f2ac70323526e5bcc0
Author: Ben Webb 
Date:   Sat,  6 Oct 2001 20:06:18 +0000

Bug fix for handling of SOCKS4 CONNECT reply code


Diffstat:
  M src/network.c                       |       6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/network.c b/src/network.c
t@@ -378,11 +378,11 @@ g_print("FIXME: SOCKS5 connect reply\n");
          if (data[0]!=0) {
             SetError(&NetBuf->error,&ETSocks,SEC_REPLYVERSION);
          } else {
-            if (data[0]==90) {
+            if (data[1]==90) {
                NetBuf->status = NBS_CONNECTED;
                retval=TRUE;
-            } else if (data[0]>=SEC_REJECT && data[0]<=SEC_IDMISMATCH) {
-               SetError(&NetBuf->error,&ETSocks,data[0]);
+            } else if (data[1]>=SEC_REJECT && data[1]<=SEC_IDMISMATCH) {
+               SetError(&NetBuf->error,&ETSocks,data[1]);
             } else {
                SetError(&NetBuf->error,&ETSocks,SEC_UNKNOWN);
             }