diff options
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r-- | src/common/torgzip.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c index a524deba3f..e2fa98ec7f 100644 --- a/src/common/torgzip.c +++ b/src/common/torgzip.c @@ -76,7 +76,7 @@ tor_gzip_compress(char **out, size_t *out_len, if (method == GZIP_METHOD && !is_gzip_supported()) { /* Old zlib version don't support gzip in deflateInit2 */ - warn(LD_GENERAL, "Gzip not supported with zlib %s", ZLIB_VERSION); + log_warn(LD_GENERAL, "Gzip not supported with zlib %s", ZLIB_VERSION); return -1; } @@ -92,8 +92,8 @@ tor_gzip_compress(char **out, size_t *out_len, if (deflateInit2(stream, Z_BEST_COMPRESSION, Z_DEFLATED, method_bits(method), 8, Z_DEFAULT_STRATEGY) != Z_OK) { - warn(LD_GENERAL, "Error from deflateInit2: %s", - stream->msg?stream->msg:"<no message>"); + log_warn(LD_GENERAL, "Error from deflateInit2: %s", + stream->msg?stream->msg:"<no message>"); goto err; } @@ -121,15 +121,15 @@ tor_gzip_compress(char **out, size_t *out_len, stream->avail_out = out_size - offset; break; default: - warn(LD_GENERAL, "Gzip compression didn't finish: %s", - stream->msg ? stream->msg : "<no message>"); + log_warn(LD_GENERAL, "Gzip compression didn't finish: %s", + stream->msg ? stream->msg : "<no message>"); goto err; } } done: *out_len = stream->total_out; if (deflateEnd(stream)!=Z_OK) { - warn(LD_GENERAL, "Error freeing gzip structures"); + log_warn(LD_GENERAL, "Error freeing gzip structures"); goto err; } tor_free(stream); @@ -171,7 +171,7 @@ tor_gzip_uncompress(char **out, size_t *out_len, if (method == GZIP_METHOD && !is_gzip_supported()) { /* Old zlib version don't support gzip in inflateInit2 */ - warn(LD_GENERAL, "Gzip not supported with zlib %s", ZLIB_VERSION); + log_warn(LD_GENERAL, "Gzip not supported with zlib %s", ZLIB_VERSION); return -1; } @@ -186,8 +186,8 @@ tor_gzip_uncompress(char **out, size_t *out_len, if (inflateInit2(stream, method_bits(method)) != Z_OK) { - warn(LD_GENERAL, "Error from inflateInit2: %s", - stream->msg?stream->msg:"<no message>"); + log_warn(LD_GENERAL, "Error from inflateInit2: %s", + stream->msg?stream->msg:"<no message>"); goto err; } @@ -206,8 +206,8 @@ tor_gzip_uncompress(char **out, size_t *out_len, goto done; /* There may be more compressed data here. */ if (inflateInit2(stream, method_bits(method)) != Z_OK) { - warn(LD_GENERAL, "Error from inflateInit2: %s", - stream->msg?stream->msg:"<no message>"); + log_warn(LD_GENERAL, "Error from inflateInit2: %s", + stream->msg?stream->msg:"<no message>"); goto err; } break; @@ -230,8 +230,8 @@ tor_gzip_uncompress(char **out, size_t *out_len, stream->avail_out = out_size - offset; break; default: - warn(LD_GENERAL, "Gzip decompression returned an error: %s", - stream->msg ? stream->msg : "<no message>"); + log_warn(LD_GENERAL, "Gzip decompression returned an error: %s", + stream->msg ? stream->msg : "<no message>"); goto err; } } @@ -240,7 +240,7 @@ tor_gzip_uncompress(char **out, size_t *out_len, r = inflateEnd(stream); tor_free(stream); if (r != Z_OK) { - warn(LD_GENERAL, "Error freeing gzip structures"); + log_warn(LD_GENERAL, "Error freeing gzip structures"); goto err; } |