aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendmid.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-03-24 15:58:11 +0000
committerNick Mathewson <nickm@torproject.org>2007-03-24 15:58:11 +0000
commitda6bd21b72153b84a4c6831467d956ddd86f2532 (patch)
tree4d411800eb8f1c827ccf983332c77b41b0d491c0 /src/or/rendmid.c
parent306d5400c367460936523f8417102f043a98fa78 (diff)
downloadtor-da6bd21b72153b84a4c6831467d956ddd86f2532.tar
tor-da6bd21b72153b84a4c6831467d956ddd86f2532.tar.gz
r12644@0-41-wifi: nickm | 2007-03-23 16:02:23 -0400
Eliminate more redundant circuit_t arguments when edge_connection_t is already supplied and the circuit is already attached. svn:r9900
Diffstat (limited to 'src/or/rendmid.c')
-rw-r--r--src/or/rendmid.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/or/rendmid.c b/src/or/rendmid.c
index c6f45a48f..d69214733 100644
--- a/src/or/rendmid.c
+++ b/src/or/rendmid.c
@@ -96,9 +96,9 @@ rend_mid_establish_intro(or_circuit_t *circ, const char *request,
}
/* Acknowledge the request. */
- if (connection_edge_send_command(NULL,TO_CIRCUIT(circ),
+ if (relay_send_command_from_edge(0, TO_CIRCUIT(circ),
RELAY_COMMAND_INTRO_ESTABLISHED,
- "", 0)<0) {
+ "", 0, NULL)<0) {
log_info(LD_GENERAL, "Couldn't send INTRO_ESTABLISHED cell.");
goto err;
}
@@ -170,17 +170,17 @@ rend_mid_introduce(or_circuit_t *circ, const char *request, size_t request_len)
intro_circ->p_circ_id);
/* Great. Now we just relay the cell down the circuit. */
- if (connection_edge_send_command(NULL, TO_CIRCUIT(intro_circ),
+ if (relay_send_command_from_edge(0, TO_CIRCUIT(intro_circ),
RELAY_COMMAND_INTRODUCE2,
- request, request_len)) {
+ request, request_len, NULL)) {
log_warn(LD_GENERAL,
"Unable to send INTRODUCE2 cell to Tor client.");
goto err;
}
/* And sent an ack down Alice's circuit. Empty body means succeeded. */
- if (connection_edge_send_command(NULL,TO_CIRCUIT(circ),
+ if (relay_send_command_from_edge(0,TO_CIRCUIT(circ),
RELAY_COMMAND_INTRODUCE_ACK,
- NULL,0)) {
+ NULL,0,NULL)) {
log_warn(LD_GENERAL, "Unable to send INTRODUCE_ACK cell to Tor client.");
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL);
return -1;
@@ -190,9 +190,9 @@ rend_mid_introduce(or_circuit_t *circ, const char *request, size_t request_len)
err:
/* Send the client an NACK */
nak_body[0] = 1;
- if (connection_edge_send_command(NULL,TO_CIRCUIT(circ),
+ if (relay_send_command_from_edge(0,TO_CIRCUIT(circ),
RELAY_COMMAND_INTRODUCE_ACK,
- nak_body, 1)) {
+ nak_body, 1, NULL)) {
log_warn(LD_GENERAL, "Unable to send NAK to Tor client.");
/* Is this right? */
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL);
@@ -228,9 +228,9 @@ rend_mid_establish_rendezvous(or_circuit_t *circ, const char *request,
}
/* Acknowledge the request. */
- if (connection_edge_send_command(NULL,TO_CIRCUIT(circ),
+ if (relay_send_command_from_edge(0,TO_CIRCUIT(circ),
RELAY_COMMAND_RENDEZVOUS_ESTABLISHED,
- "", 0)<0) {
+ "", 0, NULL)<0) {
log_warn(LD_PROTOCOL, "Couldn't send RENDEZVOUS_ESTABLISHED cell.");
reason = END_CIRC_REASON_INTERNAL;
goto err;
@@ -296,10 +296,10 @@ rend_mid_rendezvous(or_circuit_t *circ, const char *request,
}
/* Send the RENDEZVOUS2 cell to Alice. */
- if (connection_edge_send_command(NULL, TO_CIRCUIT(rend_circ),
+ if (relay_send_command_from_edge(0, TO_CIRCUIT(rend_circ),
RELAY_COMMAND_RENDEZVOUS2,
request+REND_COOKIE_LEN,
- request_len-REND_COOKIE_LEN)) {
+ request_len-REND_COOKIE_LEN, NULL)) {
log_warn(LD_GENERAL,
"Unable to send RENDEZVOUS2 cell to client on circuit %d.",
rend_circ->p_circ_id);