summaryrefslogtreecommitdiff
path: root/src/or/command.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-05-06 05:54:42 +0000
committerRoger Dingledine <arma@torproject.org>2003-05-06 05:54:42 +0000
commit03ed54e920f16d726ca22f05d0d490fb6d8eed74 (patch)
treeb1bd2e591334cef7c518999ffbec60b43613a63a /src/or/command.c
parentd7f50337c14ca42d991e44ab203b1c34591b3eb3 (diff)
downloadtor-03ed54e920f16d726ca22f05d0d490fb6d8eed74.tar.gz
tor-03ed54e920f16d726ca22f05d0d490fb6d8eed74.zip
put some symbolic constants to the onion skin lengths
svn:r265
Diffstat (limited to 'src/or/command.c')
-rw-r--r--src/or/command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/command.c b/src/or/command.c
index 0f7830e986..fc1396ca92 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -95,7 +95,7 @@ void command_process_create_cell(cell_t *cell, connection_t *conn) {
circ = circuit_new(cell->aci, conn);
circ->state = CIRCUIT_STATE_ONIONSKIN_PENDING;
- if(cell->length != 208) {
+ if(cell->length != DH_ONIONSKIN_LEN) {
log(LOG_DEBUG,"command_process_create_cell(): Bad cell length %d. Dropping.", cell->length);
circuit_close(circ);
return;
@@ -127,7 +127,7 @@ void command_process_created_cell(cell_t *cell, connection_t *conn) {
log(LOG_DEBUG,"command_process_created_cell(): got created cell from OPward? Dropping.");
return;
}
- assert(cell->length == 192);
+ assert(cell->length == DH_KEY_LEN);
if(circ->cpath) { /* we're the OP. Handshake this. */
log(LOG_DEBUG,"command_process_created_cell(): at OP. Finishing handshake.");
@@ -150,7 +150,7 @@ void command_process_created_cell(cell_t *cell, connection_t *conn) {
SET_CELL_STREAM_ID(newcell, ZERO_STREAM);
newcell.length = RELAY_HEADER_SIZE + cell->length;
- memcpy(newcell.payload+RELAY_HEADER_SIZE, cell->payload, 192);
+ memcpy(newcell.payload+RELAY_HEADER_SIZE, cell->payload, DH_KEY_LEN);
log(LOG_DEBUG,"command_process_created_cell(): Sending extended relay cell.");
if(circuit_deliver_relay_cell_from_edge(&newcell, circ, EDGE_EXIT, NULL) < 0) {