aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-18 08:38:40 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-18 08:38:40 +0000
commitbce1fc43a23153a5935cfeb53839deb07389c881 (patch)
tree993ddee9482017d3361c56a4a48a5c391a539c92
parent3fa2925a6a6402390dcecf778f7b83494a3b0e13 (diff)
downloadtor-bce1fc43a23153a5935cfeb53839deb07389c881.tar.gz
tor-bce1fc43a23153a5935cfeb53839deb07389c881.zip
when you get an intro ack, don't also count it as an intro nack
svn:r1666
-rw-r--r--src/or/or.h19
-rw-r--r--src/or/rendclient.c1
2 files changed, 11 insertions, 9 deletions
diff --git a/src/or/or.h b/src/or/or.h
index cf8238a612..bc6af6cb93 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -224,18 +224,19 @@
#define CIRCUIT_PURPOSE_C_GENERAL 5 /* normal circuit, with cpath */
#define CIRCUIT_PURPOSE_C_INTRODUCING 6 /* at Alice, connecting to intro point */
#define CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT 7 /* at Alice, sent INTRODUCE1 to intro point, waiting for ACK/NAK */
+#define CIRCUIT_PURPOSE_C_INTRODUCE_ACKED 8 /* at Alice, introduced and acked, closing */
-#define CIRCUIT_PURPOSE_C_ESTABLISH_REND 8 /* at Alice, waiting for ack */
-#define CIRCUIT_PURPOSE_C_REND_READY 9 /* at Alice, waiting for Bob */
-#define CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED 10 /* at Alice, waiting for Bob */
-#define CIRCUIT_PURPOSE_C_REND_JOINED 11 /* at Alice, rendezvous established */
+#define CIRCUIT_PURPOSE_C_ESTABLISH_REND 9 /* at Alice, waiting for ack */
+#define CIRCUIT_PURPOSE_C_REND_READY 10 /* at Alice, waiting for Bob */
+#define CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED 11 /* at Alice, waiting for Bob */
+#define CIRCUIT_PURPOSE_C_REND_JOINED 12 /* at Alice, rendezvous established */
-#define CIRCUIT_PURPOSE_S_ESTABLISH_INTRO 12 /* at Bob, waiting for introductions */
-#define CIRCUIT_PURPOSE_S_INTRO 13 /* at Bob, successfully established intro */
-#define CIRCUIT_PURPOSE_S_CONNECT_REND 14 /* at Bob, connecting to rend point */
+#define CIRCUIT_PURPOSE_S_ESTABLISH_INTRO 13 /* at Bob, waiting for introductions */
+#define CIRCUIT_PURPOSE_S_INTRO 14 /* at Bob, successfully established intro */
+#define CIRCUIT_PURPOSE_S_CONNECT_REND 15 /* at Bob, connecting to rend point */
-#define CIRCUIT_PURPOSE_S_REND_JOINED 15 /* at Bob, rendezvous established.*/
-#define _CIRCUIT_PURPOSE_MAX 15
+#define CIRCUIT_PURPOSE_S_REND_JOINED 16 /* at Bob, rendezvous established.*/
+#define _CIRCUIT_PURPOSE_MAX 16
#define CIRCUIT_PURPOSE_IS_ORIGIN(p) ((p)>_CIRCUIT_PURPOSE_OR_MAX)
#define CIRCUIT_IS_ORIGIN(c) (CIRCUIT_PURPOSE_IS_ORIGIN((c)->purpose))
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 1f086acbd2..05191523a1 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -171,6 +171,7 @@ rend_client_introduction_acked(circuit_t *circ,
rendcirc->purpose = CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED;
}
/* close the circuit: we won't need it anymore. */
+ circ->purpose = CIRCUIT_PURPOSE_C_INTRODUCE_ACKED;
circuit_mark_for_close(circ);
} else {
/* It's a NAK; the introduction point didn't relay our request. */