From 03ed54e920f16d726ca22f05d0d490fb6d8eed74 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 6 May 2003 05:54:42 +0000 Subject: put some symbolic constants to the onion skin lengths svn:r265 --- src/or/command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/or/command.c') 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) { -- cgit v1.2.3-54-g00ecf