diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-04-17 17:10:41 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-04-17 17:10:41 +0000 |
commit | 32a3e704b48ac277456fd89c6bd8cd96ccb3d0c8 (patch) | |
tree | 27b2fd77b157b7663af55c3a3483e5cbaf39cb81 /src/or/connection_edge.c | |
parent | fdf4d4aa85c1b996f36944cea19c13e49e52b972 (diff) | |
download | tor-32a3e704b48ac277456fd89c6bd8cd96ccb3d0c8.tar tor-32a3e704b48ac277456fd89c6bd8cd96ccb3d0c8.tar.gz |
Choose correct abstraction for topic_foo. Abstract random-integer code
svn:r249
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 4a82d65a9..bc3828439 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -27,8 +27,8 @@ int connection_edge_process_inbuf(connection_t *conn) { memset(&cell, 0, sizeof(cell_t)); cell.command = CELL_DATA; cell.length = TOPIC_HEADER_SIZE; - cell.topic_command = TOPIC_COMMAND_END; - cell.topic_id = conn->topic_id; + SET_CELL_TOPIC_COMMAND(cell, TOPIC_COMMAND_END); + SET_CELL_TOPIC_ID(cell, conn->topic_id); cell.aci = circ->n_aci; if (circuit_deliver_data_cell_from_edge(&cell, circ, conn->type) < 0) { @@ -76,8 +76,8 @@ int connection_edge_send_command(connection_t *conn, circuit_t *circ, int topic_ else cell.aci = circ->p_aci; cell.command = CELL_DATA; - cell.topic_command = topic_command; - cell.topic_id = conn->topic_id; + SET_CELL_TOPIC_COMMAND(cell, topic_command); + SET_CELL_TOPIC_ID(cell, conn->topic_id); cell.length = TOPIC_HEADER_SIZE; log(LOG_INFO,"connection_edge_send_command(): delivering %d cell %s.", topic_command, conn->type == CONN_TYPE_AP ? "forward" : "backward"); @@ -100,8 +100,8 @@ int connection_edge_process_data_cell(cell_t *cell, circuit_t *circ, int edge_ty assert(cell && circ); - topic_command = cell->topic_command; - topic_id = cell->topic_id; + topic_command = CELL_TOPIC_COMMAND(*cell); + topic_id = CELL_TOPIC_ID(*cell); log(LOG_DEBUG,"connection_edge_process_data_cell(): command %d topic %d", topic_command, topic_id); num_seen++; log(LOG_DEBUG,"connection_edge_process_data_cell(): Now seen %d data cells here.", num_seen); |