aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2017-04-18 01:23:39 +0200
committerAlexander Færøy <ahf@torproject.org>2017-04-18 01:23:39 +0200
commitb8c9f229d747d4edc739198113dfb7e3818e23bc (patch)
tree80a8e8e05118d18b989548fd182a67ae8653c6fa /src/or/dirserv.c
parent40ed68290e69d32d95bc0d0c259d8c76ae3e80ef (diff)
downloadtor-b8c9f229d747d4edc739198113dfb7e3818e23bc.tar.gz
tor-b8c9f229d747d4edc739198113dfb7e3818e23bc.zip
Rename `write_to_buf_zlib()` to `write_to_buf_compress()`.
See https://bugs.torproject.org/21663
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 2746d09543..e76fd932ca 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -3498,7 +3498,7 @@ spooled_resource_flush_some(spooled_resource_t *spooled,
return SRFS_DONE;
}
if (conn->compress_state) {
- connection_write_to_buf_zlib((const char*)body, bodylen, conn, 0);
+ connection_write_to_buf_compress((const char*)body, bodylen, conn, 0);
} else {
connection_write_to_buf((const char*)body, bodylen, TO_CONN(conn));
}
@@ -3524,8 +3524,9 @@ spooled_resource_flush_some(spooled_resource_t *spooled,
return SRFS_ERR;
ssize_t bytes = (ssize_t) MIN(DIRSERV_CACHED_DIR_CHUNK_SIZE, remaining);
if (conn->compress_state) {
- connection_write_to_buf_zlib(cached->dir_z + spooled->cached_dir_offset,
- bytes, conn, 0);
+ connection_write_to_buf_compress(
+ cached->dir_z + spooled->cached_dir_offset,
+ bytes, conn, 0);
} else {
connection_write_to_buf(cached->dir_z + spooled->cached_dir_offset,
bytes, TO_CONN(conn));
@@ -3789,9 +3790,9 @@ connection_dirserv_flushed_some(dir_connection_t *conn)
smartlist_free(conn->spool);
conn->spool = NULL;
if (conn->compress_state) {
- /* Flush the zlib state: there could be more bytes pending in there, and
- * we don't want to omit bytes. */
- connection_write_to_buf_zlib("", 0, conn, 1);
+ /* Flush the compression state: there could be more bytes pending in there,
+ * and we don't want to omit bytes. */
+ connection_write_to_buf_compress("", 0, conn, 1);
tor_compress_free(conn->compress_state);
conn->compress_state = NULL;
}