summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index ad42e178d2..be0c9a4820 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -1651,8 +1651,9 @@ connection_ap_handshake_send_begin(edge_connection_t *ap_conn,
tor_assert(circ->build_state->onehop_tunnel == 0);
}
- if (connection_edge_send_command(ap_conn, TO_CIRCUIT(circ),
- begin_type, payload, payload_len,
+ if (connection_edge_send_command(ap_conn, TO_CIRCUIT(circ), begin_type,
+ begin_type == RELAY_COMMAND_BEGIN ? payload : NULL,
+ begin_type == RELAY_COMMAND_BEGIN ? payload_len : 0,
ap_conn->cpath_layer) < 0)
return -1; /* circuit is closed, don't continue */