summaryrefslogtreecommitdiff
path: root/src/or/rendclient.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-01-11 12:10:14 -0500
committerNick Mathewson <nickm@torproject.org>2012-01-11 12:10:14 -0500
commitf729e1e984896a9d6852768a8e5528932f668ac3 (patch)
treef6e1aa68ec9e5f6875a06224333b96b8f7938b2e /src/or/rendclient.c
parentf37181620951d2e7a13f1363386563115d628761 (diff)
parentb5af456685b502462385b5f1b7f22f4374822fe1 (diff)
downloadtor-f729e1e984896a9d6852768a8e5528932f668ac3.tar.gz
tor-f729e1e984896a9d6852768a8e5528932f668ac3.zip
Merge branch 'feature3457-v4-nm-squashed'
Conflicts: src/or/rendclient.c
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r--src/or/rendclient.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index dff8bc33a8..1acc9eaa8d 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -292,7 +292,8 @@ rend_client_send_introduction(origin_circuit_t *introcirc,
}
/* Now, we wait for an ACK or NAK on this circuit. */
- introcirc->_base.purpose = CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT;
+ circuit_change_purpose(TO_CIRCUIT(introcirc),
+ CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT);
/* Set timestamp_dirty, because circuit_expire_building expects it
* to specify when a circuit entered the _C_INTRODUCE_ACK_WAIT
* state. */
@@ -355,7 +356,8 @@ rend_client_introduction_acked(origin_circuit_t *circ,
#ifndef NON_ANONYMOUS_MODE_ENABLED
tor_assert(!(rendcirc->build_state->onehop_tunnel));
#endif
- rendcirc->_base.purpose = CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED;
+ circuit_change_purpose(TO_CIRCUIT(rendcirc),
+ CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED);
/* Set timestamp_dirty, because circuit_expire_building expects
* it to specify when a circuit entered the
* _C_REND_READY_INTRO_ACKED state. */
@@ -364,11 +366,12 @@ rend_client_introduction_acked(origin_circuit_t *circ,
log_info(LD_REND,"...Found no rend circ. Dropping on the floor.");
}
/* close the circuit: we won't need it anymore. */
- circ->_base.purpose = CIRCUIT_PURPOSE_C_INTRODUCE_ACKED;
+ circuit_change_purpose(TO_CIRCUIT(circ),
+ CIRCUIT_PURPOSE_C_INTRODUCE_ACKED);
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_FINISHED);
} else {
/* It's a NAK; the introduction point didn't relay our request. */
- circ->_base.purpose = CIRCUIT_PURPOSE_C_INTRODUCING;
+ circuit_change_purpose(TO_CIRCUIT(circ), CIRCUIT_PURPOSE_C_INTRODUCING);
/* Remove this intro point from the set of viable introduction
* points. If any remain, extend to a new one and try again.
* If none remain, refetch the service descriptor.
@@ -823,7 +826,7 @@ rend_client_rendezvous_acked(origin_circuit_t *circ, const uint8_t *request,
}
log_info(LD_REND,"Got rendezvous ack. This circuit is now ready for "
"rendezvous.");
- circ->_base.purpose = CIRCUIT_PURPOSE_C_REND_READY;
+ circuit_change_purpose(TO_CIRCUIT(circ), CIRCUIT_PURPOSE_C_REND_READY);
/* Set timestamp_dirty, because circuit_expire_building expects it
* to specify when a circuit entered the _C_REND_READY state. */
circ->_base.timestamp_dirty = time(NULL);
@@ -887,7 +890,7 @@ rend_client_receive_rendezvous(origin_circuit_t *circ, const uint8_t *request,
hop->dh_handshake_state = NULL;
/* All is well. Extend the circuit. */
- circ->_base.purpose = CIRCUIT_PURPOSE_C_REND_JOINED;
+ circuit_change_purpose(TO_CIRCUIT(circ), CIRCUIT_PURPOSE_C_REND_JOINED);
hop->state = CPATH_STATE_OPEN;
/* set the windows to default. these are the windows
* that alice thinks bob has.