summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-06 19:56:47 -0500
committerNick Mathewson <nickm@torproject.org>2012-11-06 21:23:46 -0500
commitbfffc1f0fc7616a25c32da2eb759dade4651659e (patch)
treeb31b3fe368816de2f5a001fbd975ead5aa1c2d9e /src/or/relay.c
parentcd054ceadaa4723f076c7050160424b356b985ca (diff)
downloadtor-bfffc1f0fc7616a25c32da2eb759dade4651659e.tar.gz
tor-bfffc1f0fc7616a25c32da2eb759dade4651659e.zip
Allow a v4 link protocol for 4-byte circuit IDs.
Implements proposal 214. Needs testing.
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index bd99d91dca..b1e4bfb8f3 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1870,10 +1870,10 @@ dump_cell_pool_usage(int severity)
/** Allocate a new copy of packed <b>cell</b>. */
static INLINE packed_cell_t *
-packed_cell_copy(const cell_t *cell)
+packed_cell_copy(const cell_t *cell, int wide_circ_ids)
{
packed_cell_t *c = packed_cell_new();
- cell_pack(c, cell);
+ cell_pack(c, cell, wide_circ_ids);
c->next = NULL;
return c;
}
@@ -1895,9 +1895,10 @@ cell_queue_append(cell_queue_t *queue, packed_cell_t *cell)
/** Append a newly allocated copy of <b>cell</b> to the end of <b>queue</b> */
void
-cell_queue_append_packed_copy(cell_queue_t *queue, const cell_t *cell)
+cell_queue_append_packed_copy(cell_queue_t *queue, const cell_t *cell,
+ int wide_circ_ids)
{
- packed_cell_t *copy = packed_cell_copy(cell);
+ packed_cell_t *copy = packed_cell_copy(cell, wide_circ_ids);
/* Remember the time when this cell was put in the queue. */
if (get_options()->CellStatistics) {
struct timeval now;
@@ -2224,7 +2225,7 @@ append_cell_to_circuit_queue(circuit_t *circ, channel_t *chan,
streams_blocked = circ->streams_blocked_on_p_chan;
}
- cell_queue_append_packed_copy(queue, cell);
+ cell_queue_append_packed_copy(queue, cell, chan->wide_circ_ids);
/* If we have too many cells on the circuit, we should stop reading from
* the edge streams for a while. */