mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Become capable of noticing that we are done sending a directory.
svn:r6659
This commit is contained in:
parent
5c0d7fb016
commit
f1993b8b30
@ -1804,6 +1804,7 @@ connection_dirserv_add_dir_bytes_to_outbuf(connection_t *conn)
|
||||
|
||||
bytes = DIRSERV_BUFFER_MIN - buf_datalen(conn->outbuf);
|
||||
tor_assert(bytes > 0);
|
||||
tor_assert(conn->cached_dir);
|
||||
if (bytes < 8192)
|
||||
bytes = 8192;
|
||||
remaining = conn->cached_dir->dir_z_len - conn->cached_dir_offset;
|
||||
@ -1819,7 +1820,7 @@ connection_dirserv_add_dir_bytes_to_outbuf(connection_t *conn)
|
||||
bytes, conn);
|
||||
}
|
||||
conn->cached_dir_offset += bytes;
|
||||
if (bytes == (int)conn->cached_dir->dir_z_len) {
|
||||
if (conn->cached_dir_offset == (int)conn->cached_dir->dir_z_len) {
|
||||
/* We just wrote the last one; finish up. */
|
||||
if (conn->zlib_state) {
|
||||
connection_write_to_buf_zlib(conn, conn->zlib_state, "", 0, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user