diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-15 17:22:12 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-15 17:22:12 -0400 |
commit | dae12425328f1ba69498d5dec5ce747af7e19013 (patch) | |
tree | c01b22bc96acc58e46e5017ab8eb26baa0342a94 /src/or/dirserv.c | |
parent | ec6b2bbf9bb561e34f9fbe6663d1eb691604348d (diff) | |
parent | 9e3f3041139f60c5d109aff345bc560490329b10 (diff) | |
download | tor-dae12425328f1ba69498d5dec5ce747af7e19013.tar.gz tor-dae12425328f1ba69498d5dec5ce747af7e19013.zip |
Merge branch 'ahf_bugs_21667_2_squashed'
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 77e99fbc17..2b10a09ead 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1184,8 +1184,8 @@ new_cached_dir(char *s, time_t published) d->dir = s; d->dir_len = strlen(s); d->published = published; - if (tor_compress(&(d->dir_z), &(d->dir_z_len), d->dir, d->dir_len, - ZLIB_METHOD)) { + if (tor_compress(&(d->dir_compressed), &(d->dir_compressed_len), + d->dir, d->dir_len, ZLIB_METHOD)) { log_warn(LD_BUG, "Error compressing directory"); } return d; @@ -1196,7 +1196,7 @@ static void clear_cached_dir(cached_dir_t *d) { tor_free(d->dir); - tor_free(d->dir_z); + tor_free(d->dir_compressed); memset(d, 0, sizeof(cached_dir_t)); } @@ -3513,7 +3513,7 @@ spooled_resource_estimate_size(const spooled_resource_t *spooled, if (cached == NULL) { return 0; } - size_t result = compressed ? cached->dir_z_len : cached->dir_len; + size_t result = compressed ? cached->dir_compressed_len : cached->dir_len; return result; } } @@ -3572,8 +3572,8 @@ spooled_resource_flush_some(spooled_resource_t *spooled, int64_t total_len; const char *ptr; if (cached) { - total_len = cached->dir_z_len; - ptr = cached->dir_z; + total_len = cached->dir_compressed_len; + ptr = cached->dir_compressed; } else { total_len = spooled->cce_len; ptr = (const char *)spooled->cce_body; |