diff options
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 13 |
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; } |