diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-04-18 01:10:25 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2017-04-18 01:10:25 +0200 |
commit | 4b9349192d4bd2e9c598b13d74bc826c8f16d40e (patch) | |
tree | 4f95f1bf1d0c4de60e72ccc4fc0946c93c1fdd38 /src/or/dirserv.c | |
parent | 3c4459bcbf1d3a9da4a8b3a8bfed10d2e045af74 (diff) | |
download | tor-4b9349192d4bd2e9c598b13d74bc826c8f16d40e.tar.gz tor-4b9349192d4bd2e9c598b13d74bc826c8f16d40e.zip |
Rename `zlib_state` to `compress_state` in `dir_connection_t`.
This patch renames the `zlib_state` field in `dir_connection_t` to
`compress_state`.
See https://bugs.torproject.org/21663
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 186478c1c7..2746d09543 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -3497,7 +3497,7 @@ spooled_resource_flush_some(spooled_resource_t *spooled, /* Absent objects count as "done". */ return SRFS_DONE; } - if (conn->zlib_state) { + if (conn->compress_state) { connection_write_to_buf_zlib((const char*)body, bodylen, conn, 0); } else { connection_write_to_buf((const char*)body, bodylen, TO_CONN(conn)); @@ -3523,7 +3523,7 @@ spooled_resource_flush_some(spooled_resource_t *spooled, if (BUG(remaining < 0)) return SRFS_ERR; ssize_t bytes = (ssize_t) MIN(DIRSERV_CACHED_DIR_CHUNK_SIZE, remaining); - if (conn->zlib_state) { + if (conn->compress_state) { connection_write_to_buf_zlib(cached->dir_z + spooled->cached_dir_offset, bytes, conn, 0); } else { @@ -3788,12 +3788,12 @@ connection_dirserv_flushed_some(dir_connection_t *conn) /* If we get here, we're done. */ smartlist_free(conn->spool); conn->spool = NULL; - if (conn->zlib_state) { + 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); - tor_compress_free(conn->zlib_state); - conn->zlib_state = NULL; + tor_compress_free(conn->compress_state); + conn->compress_state = NULL; } return 0; } |