diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-07-31 11:39:31 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-27 12:28:43 -0400 |
commit | 200921dc313c7077c5d36aeda4b885e18c29fa70 (patch) | |
tree | 6888b68bdcf6872d2e75aa8d44fa88503b0707da /src/or/relay.c | |
parent | 57e7b54b7b4102de0c5776a1268367c18090033b (diff) | |
download | tor-200921dc313c7077c5d36aeda4b885e18c29fa70.tar.gz tor-200921dc313c7077c5d36aeda4b885e18c29fa70.zip |
Refactor users of buf_datalen to bufferevent-friendly version.
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 480a291037..16048fa8c7 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -1365,7 +1365,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial, return 0; } - amount_to_process = buf_datalen(conn->_base.inbuf); + amount_to_process = connection_get_inbuf_len(TO_CONN(conn)); if (!amount_to_process) return 0; @@ -1384,7 +1384,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial, connection_fetch_from_buf(payload, length, TO_CONN(conn)); log_debug(domain,"(%d) Packaging %d bytes (%d waiting).", conn->_base.s, - (int)length, (int)buf_datalen(conn->_base.inbuf)); + (int)length, (int)connection_get_inbuf_len(TO_CONN(conn))); if (connection_edge_send_command(conn, RELAY_COMMAND_DATA, payload, length) < 0 ) @@ -2415,7 +2415,7 @@ append_cell_to_circuit_queue(circuit_t *circ, or_connection_t *orconn, make_circuit_active_on_conn(circ, orconn); } - if (! buf_datalen(orconn->_base.outbuf)) { + if (! connection_get_outbuf_len(TO_CONN(orconn))) { /* There is no data at all waiting to be sent on the outbuf. Add a * cell, so that we can notice when it gets flushed, flushed_some can * get called, and we can start putting more data onto the buffer then. |