diff options
author | Roger Dingledine <arma@torproject.org> | 2003-03-12 12:06:54 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-03-12 12:06:54 +0000 |
commit | c5ed007ac82d3b64d65dcce9ab510486cf88c1b1 (patch) | |
tree | 7aba717e9ca4e30b5d3bb7493b5889ab742b0e3d | |
parent | 9566ac4799c5b9321b2f2dba69b81cfc3f8ade34 (diff) | |
download | tor-c5ed007ac82d3b64d65dcce9ab510486cf88c1b1.tar tor-c5ed007ac82d3b64d65dcce9ab510486cf88c1b1.tar.gz |
respond to nick's question about link padding
(nick: note that link padding is currently disabled)
svn:r178
-rw-r--r-- | src/or/connection.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 919da19f5..4108aa2a2 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -481,6 +481,19 @@ void connection_send_cell(connection_t *conn) { /* ???? If we might not have added a cell above, why are we * ???? increasing outbuf_flushlen? -NM */ + /* The connection_write_cell_to_buf() call doesn't increase the flushlen + * (if link padding is on). So if there isn't a whole cell waiting-but- + * not-yet-flushed, we add a padding cell. Thus in any case the gap between + * outbuf_datalen and outbuf_flushlen is at least sizeof(cell_t). -RD + */ + /* XXXX actually, there are some subtle bugs lurking in here. They + * have to do with the fact that we don't handle connection failure + * cleanly. Sometimes we mark things to be closed later. Inside + * connection_write_cell_to_buf, it returns successfully without + * writing if the connection has been marked for close. We need to + * look at all our failure cases more carefully and make sure they do + * the right thing. + */ conn->outbuf_flushlen += sizeof(cell_t); /* instruct it to send a cell */ connection_start_writing(conn); |