summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-07-31 11:39:31 -0400
committerNick Mathewson <nickm@torproject.org>2010-09-27 12:28:43 -0400
commit200921dc313c7077c5d36aeda4b885e18c29fa70 (patch)
tree6888b68bdcf6872d2e75aa8d44fa88503b0707da /src/or/directory.c
parent57e7b54b7b4102de0c5776a1268367c18090033b (diff)
downloadtor-200921dc313c7077c5d36aeda4b885e18c29fa70.tar.gz
tor-200921dc313c7077c5d36aeda4b885e18c29fa70.zip
Refactor users of buf_datalen to bufferevent-friendly version.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index b109cb53a7..7f8d1167b3 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2134,7 +2134,7 @@ connection_dir_process_inbuf(dir_connection_t *conn)
return 0;
}
- if (buf_datalen(conn->_base.inbuf) > MAX_DIRECTORY_OBJECT_SIZE) {
+ if (connection_get_inbuf_len(TO_CONN(conn)) > MAX_DIRECTORY_OBJECT_SIZE) {
log_warn(LD_HTTP, "Too much data received from directory connection: "
"denial of service attempt, or you need to upgrade?");
connection_mark_for_close(TO_CONN(conn));